What problem does it solve?
This Skill enables developers to implement and manage reactive state in Angular using signals, providing synchronous primitives for writing state, deriving values with computed(), creating dependent state with linkedSignal(), and triggering side effects with effect(), all while avoiding traditional BehaviorSubject/Observable boilerplate.
Core Features & Use Cases
- Writable state with signal() for fine-grained reactivity in components and services.
- Derived state with computed() to automatically recompute values when dependencies change.
- Dependent state with linkedSignal() to synchronize related state and reset when sources change.
- Side effects with effect() to run logic in response to state changes, with optional cleanup.
- Use Case: Migrate an existing component that uses BehaviorSubject to a more ergonomic signal-based pattern for simpler state flows.
Quick Start
Use signal() to create and manage state. Example: const count = signal(0); read with count(); update with count.set(5); derive with computed(() => count() + 1); react to changes with effect(() => console.log(count()));