Real-world mini-appsPath 21/21
ReducersState & eventsComposition
Prerequisites are suggestions only. Every challenge stays open.
Undo/Redo Editor
Represent reversible changes with a reducer and two history stacks.
Requirements
- Model past, present, and future explicitly.
- Add the old present to history on every real edit.
- Clear future history after a new edit.
- Disable impossible undo and redo actions.
- Keep all transitions pure inside a typed reducer.