/
/
| title | Architecture |
| description | Component tree and data flow for the todo app |
| tags | architecturecomponentsdata-flow |
This document describes the component architecture and data flow of the todo app.
Each component lives in its own file within src/:
The app uses a single useState hook inside useTodos. There is no external state library — React's built-in state is sufficient for this scale.
useTodos hook follows the custom hook pattern: encapsulate related state and effects, return a clean API. See docs/features for the TypeScript interface.
Todos are serialized to localStorage on every state change via a useEffect. On mount, the hook reads from storage to restore previous state: