angular-state-management

Implements Angular state management patterns using Signals, NgRx, and RxJS.

1|Updated Dec 29, 2025
One-click install
npx skills add https://github.com/ratnesh-maurya/tracker.ratnesh-maurya.com --skill angular-state-management-ratnesh-maurya
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: angular-state-management
Source: https://github.com/ratnesh-maurya/tracker.ratnesh-maurya.com/tree/main/.claude/skills/angular-state-management
Command: npx skills add https://github.com/ratnesh-maurya/tracker.ratnesh-maurya.com --skill angular-state-management-ratnesh-maurya

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Choosing and implementing the right state management approach in Angular is confusing, with options ranging from Signals to NgRx to RxJS stores, and picking the wrong one leads to over-engineered or unmaintainable code. ## Core Features & Use Cases - Decision Frameworks: Provides selection criteria and decision trees mapping app size and state complexity to Signal services, ComponentStore, SignalStore, or full NgRx Store. - Implementation Patterns: Includes complete code examples for Signal-based services, NgRx SignalStore, NgRx Store with actions/reducers/effects/selectors, and RxJS ComponentStore. - Migration & Bridging: Covers migrating from BehaviorSubject to Signals and bridging Signals with RxJS using toSignal and toObservable. - Use Case: When building a new Angular feature that needs shared state with computed values, use this Skill to scaffold an NgRx SignalStore with withState, withComputed, and withMethods instead of wiring a full NgRx Store. ## Quick Start Ask the AI to set up state management for an Angular feature, for example: create a Signal-based store for a product list with filtering and async loading.

Frequently Asked Questions about angular-state-management

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I choose between Signals and NgRx for Angular state management?▼

Use Signal services for small apps with simple shared state, ComponentStore for medium apps with component-scoped async operations, and full NgRx Store for large apps with complex cross-feature dependencies. The decision tree maps app size and state complexity to the appropriate solution.

How to migrate from BehaviorSubject to Angular Signals?▼

Replace the BehaviorSubject with a writable signal, expose it publicly with asReadonly(), and change next() calls to set() or update(). Components then read state by calling the signal directly instead of subscribing to an observable.

What is NgRx SignalStore and when should I use it?▼

NgRx SignalStore is a signal-based state solution built with signalStore, withState, withComputed, and withMethods. Use it for feature-scoped state that needs computed values and methods without the boilerplate of full NgRx actions, reducers, and effects.

Can I use Angular Signals together with RxJS observables?▼

Yes, Angular provides toSignal and toObservable from @angular/core/rxjs-interop to bridge the two paradigms. Convert route params or HTTP streams to signals for templates, or convert signals to observables when you need operators like debounceTime and switchMap.

How do I implement optimistic updates with Angular Signals?▼

Update the signal state immediately before the API call, then roll back to the previous state in the catch block if the request fails. Store the prior data before the optimistic mutation so it can be restored on error.

When should I not use NgRx Store in an Angular app?▼

Avoid full NgRx Store for small apps or simple shared UI state like theme and user preferences, where a Signal service is sufficient. Over-globalizing state adds unnecessary boilerplate; keep state local or feature-scoped when possible.