Skip to content

kiprop-dave/todo-app

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Frontend Mentor - Todo app solution

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.

Table of contents

Overview

The challenge

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 ✅

Screenshot

Links

This app is deployed using Vercel

My process

Built with

  • Semantic HTML5 markup
  • CSS custom properties
  • Flexbox
  • CSS Grid
  • Mobile-first workflow
  • React - JS library

What I learned

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]);

Continued development

I plan on making this app a fullstack CRUD app by integrating it with firebase.

Useful resources

  • 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.

Author

Acknowledgements

I learnt how to drag items in a list from this video

About

This is my solution to the todo app challenge on Frontend Mentor

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published