Build this React exercise in 35 minutes.
Create a small task list with Add, checkbox toggle, Remove, Undo, and Redo. Start with the two supplied tasks. Store immutable snapshots as past/present/future; keep at most 20 prior snapshots. New task actions after Undo discard the redo branch. Input typing is not a history action. IDs are generated once in the Add event and survive Undo/Redo. This is local state only: no persistence, rich-text editor, keyboard shortcut, API, or collaborative history.
Acceptance checks
- Add, toggle, and remove each produce one undo step; typing in the input produces none.
- Undo restores the exact previous task IDs, order, text, and checked states; Redo reapplies it.
- After Undo, a new task action clears all redo history; blank Add creates no history entry.
- Undo and Redo are disabled at their boundaries. Empty lists remain usable.
- Keep at most 20 previous snapshots; undoing and redoing never mutates any saved snapshot. The unsent input draft is independent of history.
Saving a submission records completion; it does not run these manual checks.
Learn and continue
Prerequisite: Immutable state. Work through the React Machine Coding Foundations path to practice related skills in order.