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.
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 ✅
This app is deployed using Vercel
- Solution URL: https://www.frontendmentor.io/solutions/responsive-todo-app-built-using-react-1EJR5nNYqw
- Live Site URL: https://todo-app-ten-eta.vercel.app/
- Semantic HTML5 markup
- CSS custom properties
- Flexbox
- CSS Grid
- Mobile-first workflow
- React - JS library
In this project, I learnt how to use the useEffect hook with local storage. I also learnt to initialize state from local storage.
const [todos, setTodos] = useState(
() => JSON.parse(localStorage.getItem("todoItems")) || []
);
useEffect(() => {
localStorage.setItem("todoItems", JSON.stringify(todos));
}, [todos]);
I plan on making this app a fullstack CRUD app by integrating it with firebase.
- scrimba - This is in my opinion the best place to learn web development.
- backgrounImage - This is an amazing article which helped me finally understand how to set inline background image style. I'd recommend it to anyone still learning this concept.
- stack overflow - Whenever I got stuck, I always found some insight here.
- Website - tanuikiprop
- Frontend Mentor - @kiprop-dave
I learnt how to drag items in a list from this video