State Management
Single Source
Single source of truth means there is one authoritative state for the app, not many competing copies.
Benefits
- No data drift between components
- UI is always derived from the same state
- Debugging is simpler: one place to inspect
In Flux vs Redux
- Flux: each domain has a store, but each store is still the single source for its domain
- Redux: one global store holds all state