Filling the Gap in State with NgRx ComponentStore
summary
A standalone local-state library claims to replace the “service with a Subject” pattern and actually ships as @ngrx/component-store, a compact implementation of about ~300 lines that provides select/updater/effect APIs. It shows concrete patterns: expose observables, use updaters for immutable writes, and use effects with operators like concatMap to serialize adds (or switch/merge/exhaust to change behavior) to avoid race conditions. Examples include component-scoped provisioning, lifecycle cleanup on destroy, and real-world use inside Firebase so the approach demonstrably works.
AI-written summary · about
chapters (5)
- 0:00Start
- 3:59Component Tree
- 8:57Race Conditions
- 11:13Initialize the State
- 21:27The Shared Common Component State
related talks
39mHow to use NgRx ComponentStore?
51mAlex Okushko - Software Engineer at Google/Firebase | NGUPEx
31mUnlocking Reactive State Super Powers with NgRx Signal Store
31mNgRx SignalStore: The Ultimate Tool for Modern State Management
18mNgRx SignalStore: Modern State Management for Angular
17mCustom Features of NgRx SignalStore
20mSubjecting State to Good Behavior
35mAdvanced NgRx Techniques
