Guided project
Build a Task Manager App in React
One complete React app, built a feature at a time.
Build a task manager from an empty component to a finished app: add, finish, delete and edit tasks, filter them, save them, load them from an API and make it work from the keyboard.
- Milestones
- 6
- Steps
- 21
- Free steps
- 8
Free: milestones 1 to 2 (8 steps). Milestones 3 to 6 with DevArcade Pro.
What you'll build
A task manager that adds, finishes, edits, filters and deletes tasks, remembers them and loads them from an API.
Skills you'll practise
- Components, props and lists with keys
- State and controlled forms
- Lifting state up with function props
- Derived values and filters
- Editing in place with local state
- A custom hook that saves to localStorage
- Fetching with loading and error states
- Labels and focus for keyboard users
Milestones and steps
6 milestones and 21 steps. Every step starts from your code of the step before, adds one feature, and is tested in your browser.
- Free
Milestone 1:Lay out the app
A list from data, components, props and the look of a finished task.
- Render the task listTurn an array of tasks into a list on the screen with map and keys.
- A TaskItem componentPull one task row into its own component and pass the task in as a prop.
- A Header with propsGive the app a header component that shows a title and how many tasks there are.
- Show what is doneUse the done flag: a checkbox per task and a class that styles finished tasks.
-
- Free
Milestone 2:Add, finish and delete
State, a controlled form, and changing the list from child components.
- Add tasks with a formKeep the tasks in state and add new ones from a controlled input.
- Tidy the inputTrim titles, ignore blank ones and clear the box after adding.
- Finish a taskLift the toggle up: TaskItem calls a function prop and App updates the task.
- Delete a taskA delete button per task, and filter to remove it from state.
-
- Pro
Milestone 3:Count and filter
Derived values: tasks left, All / Active / Done filters, clearing finished tasks.
- Count what is leftDerive the number of unfinished tasks from state, and word it properly.
- Filter the listAll, Active and Done buttons: one piece of state picks which tasks show.
- Clear finished tasksA footer with the number done and a Clear done button that is off when there is nothing to clear.
- Empty statesWhen a list has nothing to show, say why instead of showing nothing.
-
- Pro
Milestone 4:Edit in place
Local state in a row: an edit box that saves on Enter and cancels on Escape.
- An edit boxGive each row its own state: an Edit button swaps the title for a box holding it.
- Save on EnterWrap the box in a form, and send the new title up to App with an onRename prop.
- Cancel with EscapeListen for the Escape key to leave the box without saving.
-
- Pro
Milestone 5:Remember and load
A custom hook that saves to localStorage, then loading tasks from an API with loading and error states.
- Remember tasksWrite a custom hook, useStoredState, that keeps a value in state and in localStorage.
- Load tasks from an APIFetch the first tasks from a server in an effect, with a loading message meanwhile.
- When loading failsCheck the response, catch failures, and offer a Try again button.
-
- Pro
Milestone 6:Polish and ship
Labels and focus for keyboard users, a progress bar, and the finishing touches.
- Labels and focusName every control for screen readers, and put focus where keyboard users expect it.
- A progress barStyle from data: a progress bar whose width is set from state with the style prop.
- Finishing touchesFinished tasks sink to the bottom and a message celebrates when everything is done.
-
Start building for free
Milestones 1 and 2 are free. DevArcade Pro opens every milestone of every project and every unit of every course, monthly or yearly.