This is a solution to the Todo app challenge on Frontend Mentor. Frontend Mentor challenges help you improve your coding skills by building realistic projects.
Note: Delete this note and update the table of contents based on what sections you keep.
Users should be able to:
- View the optimal layout for the app depending on their device's screen size
- See hover states for all interactive elements on the page
- Add new todos to the list
- Mark todos as complete
- Delete todos from the list
- Filter by all/active/complete todos
- Clear all completed todos
- Toggle light and dark mode
- Bonus: Drag and drop to reorder items on the list
Add a screenshot of your solution. The easiest way to do this is to use Firefox to view your project, right-click the page and select "Take a Screenshot". You can choose either a full-height screenshot or a cropped one based on how long the page is. If it's very long, it might be best to crop it.
Alternatively, you can use a tool like FireShot to take the screenshot. FireShot has a free option, so you don't need to purchase it.
Then crop/optimize/edit your image however you like, add it to your project, and update the file path in the image above.
Note: Delete this note and the paragraphs above when you add your screenshot. If you prefer not to add a screenshot, feel free to remove this entire section.
- Solution URL: Add solution URL here
- Live Site URL: Add live site URL here
- React - JS library
- Next.js - React framework
- TailwindCSS - CSS framework
- React Drag&Drop - DnD package
- NextJS Themes - CSS themes for nextJS
Note: These are just examples. Delete this note and replace the list above with your own choices
How to use the Drag&Drop package and dark/light themes.
<DragDropContext onDragEnd={handleDragEnd}>
<Droppable droppableId="todos">
{(provided) => (
{todos.map((todo, index) => (
<Draggable
key={todo.id}
draggableId={todo.id}
index={index}
>
{(provided) => (
<div
key={index}
className="rounded-t-lg border-b border-gray-700"
{...provided.draggableProps}
{...provided.dragHandleProps}
ref={provided.innerRef}
style={{
...provided.draggableProps.style,
}}
>
</div>
)}
</Draggable>
))}
{provided.placeholder}
</div>
)}
</Droppable>
</DragDropContext>
NextJS 13 has issues about how to deal with UI themes. The solution for that Hydration problem needs knowledge I yet do not have... The problem is related with the fact that content server side is out of faze with client side. Even by forcing layout.js to run in the browser to error remains...
- React Drag-and-Drop - Very good tutorial about useForms.
- Website - Thomas Tschoepke Soares
- Frontend Mentor - @ttsoares
Several nice people helping students with Youtube videos...