Subjecting State to Good Behavior
summary
Shows concrete, runnable patterns using RxJS instead of NgRx: a small APOD app and a NEO app that use BehaviorSubject + scan to compose immutable OnPush-ready state, a private subject exposed via asObservable, and a single public set/update API. Demonstrates optimistic updates with rollback (UI updates immediately, API success leaves it, API error reverts and emits an error), and explains where this saves code and when a full store is warranted.
AI-written summary · about
chapters (15)
- 0:00Introduction
- 0:32State Management in Angular
- 2:27Subjects
- 3:28Service with Subject
- 4:19Public Observable
- 5:06Example App
- 5:59State Service
- 8:07Data Service
- 9:08App Component
- 9:48Optimistic Updates
- 11:03Demonstration
- 12:35Creating a state class
- 14:15Dismissing errors
- 15:53Handling errors
- 17:12Conclusion
related talks
29mSubjecting State to Good Behavior
33mStop Micromanaging State and Start Being Reactive
35mAdvanced NgRx Techniques
01h 00mReactive Programming, State Management, and Redux for the Modern Front End Dev
34mReactive State Management For Your Angular App
19mStepping Up: Observable Services to Observable Store
52mState Management in Angular: From Facades to NgRx and back
28mOperate Heavily Dynamic UI’s with Rxjs
