Maintenance in progress: we are indexing a large batch of new skills. Some pages may load slowly or briefly show no results. Nothing is lost, and everything is back to normal within the hour.

Ngrx Store Patterns

Project-specific NgRx Signals Store patterns for this Angular 21 DDD application. Activates when code involves signalStore, withEntities, rxMethod, patchState, tapResponse, or any NgRx signals state management.

majiayu000 f95e415 2 files · 2.0 KB Updated 567 repo stars

File contents

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 stores
  • withStatewithEntitieswithComputedwithMethods order
  • rxMethod + tapResponse for async operations
  • patchState for all state updates — never mutate directly
  • Always include loading: boolean and error: string | null in state
  • Entity ops: setAllEntities, addEntity, updateEntity, removeEntity
  • tapResponse from @ngrx/operators, NOT @ngrx/component-store

majiayu000/claude-skill-registry-data/tree/main/development/ngrx-store-patterns commit f95e415c7d

Frequently asked questions

npx skillmds add majiayu000/ngrx-store-patterns