Tackling State in Angular Applications
summary
A simple talks app surfaces six types of state (server, persistent cache, client, URL/router, transient client storage, local UI) and shows how optimistic rating and filter updates break when requests race. A concrete bug: two rating requests leave client unrated while server records the last value. The fix separates state from side effects, stores immutable state (Redux/ngrx pattern), emits distinct actions like submitRate/unrate for undo, and uses switchMap cancels stale requests and make URL the source of truth to eliminate races.
AI-written summary · about
chapters (8)
- 0:00Introduction to state
- 1:32Six types of application state
- 5:00The synchronization problem
- 8:45URL and client state sync
- 11:28Identifying core issues
- 13:47Structuring with NgRx
- 20:40URL as the source of truth
- 26:08Conclusion and takeaways
related talks
41mManaging State in Angular Applications
20mSubjecting State to Good Behavior
41mThe Battle of State Management in modern frontend applications
34mReactive State Management For Your Angular App
01h 00mReactive Programming, State Management, and Redux for the Modern Front End Dev
26mState Management Patterns and Best Practices with NgRx
52mState management in a GraphQL era
22mThe Secret Sauce of State Management
