Why?
UI complexity drastically increased:
- Multiple Server Responses
- Pushed Data (WS, SSE)
- Handle Optimistic Updates
- Cached Data (IndexedDB, localStorage)
- Fontend Routing
- UI Animations & Interactions
No Silver Bullet
Redux is not great for making simple things quickly.
It's great for making really hard things simpleJani Eväkallio
NgRx Pattern Evolution
Why Angular?
Unidirectional Data Flow
Redux Principle
- Single source of truth: The whole state stored in object tree => Store
- State is readonly: To change state emit => Actions
- Pure functions: Changes are controlled by pure functions with specific signature => Reducers
Overall, NgRx embrace RxJs in order to streamline (no pun intended) & simplify the Redux architecture
Interests & Advantages
- Centralized & Immutable State
- Performance
- Testability
- Tooling & Ecosystem