NgRx Signals Store Patterns (Project-Specific)
For complete store patterns, read .github/instructions/ngrx-signals.instructions.md.
For store testing, read .github/instructions/ngrx-signals-testing.instructions.md.
Quick Reference
- Store location:
src/app/features/{domain}/data/state/{domain}-store.ts - Reference:
src/app/features/tasks/data/state/task-store.ts
Key Rules
signalStore({ providedIn: 'root' })for all storeswithState→withEntities→withComputed→withMethodsorderrxMethod+tapResponsefor async operationspatchStatefor all state updates — never mutate directly- Always include
loading: booleananderror: string | nullin state - Entity ops:
setAllEntities,addEntity,updateEntity,removeEntity tapResponsefrom@ngrx/operators, NOT@ngrx/component-store