You don't have access to this class

Keep learning! Join and start boosting your career

Aprovecha el precio especial y haz tu profesión a prueba de IA

Antes: $249

Currency
$209
Suscríbete

Termina en:

0 Días
8 Hrs
7 Min
53 Seg
Curso de SolidJS

Curso de SolidJS

Samuel Burbano

Samuel Burbano

ToDo App: usando reactividad y sistemas de renderizado en un proyecto

13/27
Resources

How to create an TodoApp with Solid and Tailwind?

Creating an TodoApp may seem like a simple project, but it is a great way to learn and practice fundamental concepts in application development. In this instance, we will combine Solid.js with Tailwind to experiment with responsiveness, rendering and layout. These concepts are essential to understanding not only Solid, but also other popular frameworks.

Throughout this project, we will explore everything from Dark Mode integration to implementing side effects and local storage. Get ready to dive into this hands-on project that will equip you with valuable skills for future development.

Why choose an TodoApp project?

The question arises, why a TodoApp? Although it may seem like a typical project, this application allows you to explore many crucial concepts in reactive programming:

  • Reactivity and Rendering: You will understand how these systems work, not only in Solid, but in comparison to other frameworks.
  • Dark Mode: Learn how to change interfaces using dark and light modes in a reactive way.
  • Debugging: Building an TodoApp will teach you how to effectively debug reactive applications.
  • Local Storage: Keeping the state of the application in local storage is key to a smooth user experience.

How to start a project with Tailwind and Solid.js?

To start, we follow the initialization guide provided in the course resources. Here is a summary of the steps to create your project:

  1. Clone the Solid.js Template:Use the npx command:

    npx degit solidjs/templates/ts

    Assign a suitable name, such as TodoApp, and clone the default scaffolding.

  2. Installing Tailwind:Run the following command to install the necessary dependencies:

    npm install -D tailwindcss postcss autoprefixer

    Then, initialize Tailwind with:

    npx tailwindcss init -p
  3. Tailwind configuration:Update the configuration file with the Solid.js specific guidelines. This includes the project content that Tailwind will use to purge unused styles. Make sure to integrate the Tailwind components into your index.css.

What steps to take after setting up the structure?

A well-structured project is essential for a smooth development. Next, delete unnecessary modules to simplify the code:

  • CSS Module Cleanup:remove any reference to CSSModules if you choose to work exclusively with Tailwind.

  • Tailoring the Application in App.jsx:Modify app.jsx by removing unnecessary imports, such as the default logo. Make sure the HTML structure is present and customize it with Tailwind classes.

You will use many Tailwind classes to style your application. The course repository contains the base structure that you can copy and modify according to your needs.

What's next after building the base structure?

Once you finish the primary framework, your application should be ready to run, although without dynamic functionality yet. Run the project with:

npm run dev

This will open your application in a development environment, where you can see your progress and prepare to implement interactivity in the next phases of the course. In the following classes, we will focus on bringing these static bases to life with reactivity and interactive functionality.

Remember, every reactive component you design will be another step towards becoming an expert developer in this fascinating world of reactive programming with Solid and Tailwind.

Contributions 1

Questions 0

Sort by:

Want to see more contributions, questions and answers from the community?

Esta es la estructura

 <div class="w-full h-full  min-h-screen flex items-center justify-center dark:bg-gray-600 dark:text-white">
      <button class="text-2xl fixed top-0 right-0">🌚</button>

      <div>
        <h1 class="text-2xl text-center">Solid Todo App</h1>
        <input class="border dark:text-black" type="text" />
        <button class="px-2 border">Add</button>
        <ul>
          <li>
            <input type="checkbox" checked />
            <span>
              <s>abrazaar pinguino</s>
            </span>
            <button></button>
          </li>
          <li>
            <input type="checkbox" checked />
            <span>
              <s>abrazaar pinguino</s>
            </span>
            <button></button>
          </li>
        </ul>
        <p class="text-sm mt-4">Completed count: {0}</p>
      </div>
    </div>```