NgRx Store vs ComponentStore: A State-Scope Decision Guide
Decide whether to put Angular state in the global NgRx Store, a component-scoped ComponentStore, or signalStore based on sharing needs and update frequency.
ReadMeFeed / Community knowledge
Real questions. Useful conversations. Find the people who know your stack.
Decide whether to put Angular state in the global NgRx Store, a component-scoped ComponentStore, or signalStore based on sharing needs and update frequency.
NgRx Effects isolate async side effects from components. Learn when to use switchMap for reads versus concatMap for writes, and how to keep the action stream alive with proper error handling.
NgRx SignalStore lets you keep component‑level state concise and reactive by exposing source signals and computed signals. This post walks through a concrete todo‑list example, highlights trade‑offs, and gives actionable steps to start using SignalStore in your Angular app.
Tired of writing repetitive CRUD reducers for lists? The NgRx Entity Adapter turns arrays into a normalized dictionary, gives you ready‑made reducer helpers and memoized selectors, and keeps your code type‑safe. Learn how to set it up, trade‑offs, and a real‑world example.
A decision guide that outlines when to use the global NgRx Store versus the scoped ComponentStore, compares trade‑offs, and shows a concrete ComponentStore implementation with validation steps.
Storing filtered copies in NgRx state leads to stale views and duplicated data. Derive visible items with memoized selectors and props instead.
Diagnose and fix NgRx entity adapter state inconsistencies with a clear symptom table, ordered checks, and concrete fixes. Verify uniqueness, immutability, and selector memoization to keep your store reliable.
NgRx Effects centralize async side effects, but choosing the wrong flattening operator or boundary can corrupt state. Here is an architecture note on when to use them and how to verify cancellation.
Stop manually mapping through arrays in your NgRx reducers. Learn how to use the NgRx Entity Adapter to normalize state for O(1) lookups and cleaner CRUD logic.