← Back to list

ngrx-signals
by 7Spade
⭐ 0🍴 0📅 Jan 25, 2026
SKILL.md
name: ngrx-signals description: @ngrx/signals state management for Angular 20+ using pure reactive patterns with signalStore, rxMethod, and computed signals. Use when implementing reactive state, creating stores, managing async operations, or building signal-based architecture. Replaces traditional NgRx with simpler, more performant signal-based approach. license: MIT
@ngrx/signals (v20) Skill
Rules
Store Definition
- Use
signalStore(...)to define stores - Use
withStateto define readable/writable state - Use
withMethodsfor encapsulating logic - Use
rxMethodfor async operations
State Updates
- Use
patchStateto update partial state
Derived State
- Use
computedto create derived state
Entity Management
- Use
@ngrx/signals/entitiesplugin for entity operations
Testing
- Use
@ngrx/signals/testingfor testing utilities
Context
Summary
@ngrx/signals provides signal-based reactive state management for Angular 20+, enabling predictable, testable, and scalable reactive stores.
Designed for the NgRx 20 ecosystem with first-class Signal support.
Installation
pnpm install @ngrx/signals@latest
# or
ng add @ngrx/signals
Ensure your project is upgraded to Angular v20 & NgRx v20.
Basic Usage Example
Create a SignalStore:
const CounterStore = signalStore(
withState({ count: 0 }),
withMethods((store) => ({
increment: () => patchState(store, (state) => ({
count: state.count + 1
}))
}))
);
Signals & Reactivity
- Signals are callable getter functions
- Automatically track dependencies and trigger updates (OnPush friendly)
- Include
withStateto manage initial state - Use
withMethods/rxMethodto encapsulate logic - Signals automatically track dependencies and update UI
Entity Management Details
- Methods:
addEntity,updateEntity,removeEntity, etc. - Enhanced collection management
Computed State Details
- Create derived signals when source signal changes
- Avoid manual effects/subscriptions
Testing Details
- Makes stores easier to test with helper functions
Advanced Patterns
Event-Driven Architecture:
- Experimental Events plugin for Flux-style design
- Use with caution in production
Interop with RxJS:
- Optional RxJS interoperability
- Use
rxMethodfor async operations
Recommended Project Structure
src/
├── app/
│ ├── stores/
│ │ ├── counter.store.ts # Single store
│ │ ├── users.store.ts # Entity store
│ │ └── index.ts # Exports
│ ├── features/
│ │ └── users/
│ │ ├── ui/
│ │ │ ├── user-list.component.ts
│ │ │ └── user-detail.component.ts
│ │ └── users.store.ts # Feature store
│ └── services/
│ └── api.service.ts
Learning Path
- Learn Angular Signals fundamentals
- Install & initialize @ngrx/signals
- Build simple feature store
- Add entity management
- Use advanced patterns (Events, RxJS interop)
- Write tests using @ngrx/signals/testing
Notes
- @ngrx/signals is evolving rapidly
- Events/Flux plugin is experimental
- Official docs: NgRx Signals API Reference
Score
Total Score
50/100
Based on repository quality metrics
✓SKILL.md
SKILL.mdファイルが含まれている
+20
○LICENSE
ライセンスが設定されている
0/10
○説明文
100文字以上の説明がある
0/10
○人気
GitHub Stars 100以上
0/15
○最近の活動
3ヶ月以内に更新がある
0/10
○フォーク
10回以上フォークされている
0/5
✓Issue管理
オープンIssueが50未満
+5
✓言語
プログラミング言語が設定されている
+5
○タグ
1つ以上のタグが設定されている
0/5
Reviews
💬
Reviews coming soon