Todo List Manager

Medium
Free
#State Management

Build a small todo list: add a todo, tick it off when it's done, delete it, and always see how many are left. You'll practice keeping a list in useState and updating it. The starter has the page's form and the "Remaining:" line.

Requirements

  • The list starts empty. Typing in the "New todo" field and clicking Add adds the todo to the list, unticked, and clears the field.
  • Each todo in the list shows a checkbox labelled with its text (the way "New todo" labels the field), and a Delete button.
  • Add is disabled while the field is empty or only spaces.
  • Ticking a todo's checkbox marks it done, and unticking it marks it not done again.
  • A todo's Delete button removes it. Ticking or deleting a todo never changes any other todo, even one with the same text.
  • The "Remaining:" line always shows how many todos aren't done.

React docs

Concepts you'll practice