What problem does it solve?
Improves how Angular applications manage reactive state and side effects by providing clear patterns and APIs for signals, computed values, effects, and conversions between RxJS and Signals to reduce bugs, memory leaks, and unexpected updates.
Core Features & Use Cases
- Signal-based state: Use signal() for writable state and computed() for derived values to maintain predictable UI updates.
- Side-effect management: Use effect() with onCleanup for analytics, timers, and external integrations while avoiding nested effects.
- Interop and migration: Convert Observables to Signals with toSignal() and bridge back with toObservable(), and use Signal inputs for reactive component inputs.
- Use Case: Migrate a component that uses RxJS Subjects for local UI state to Signals to simplify derived state and ensure deterministic rendering and cleanup.
Quick Start
Convert an Observable of users to a Signal, create a computed totalPrice from an items signal, and add an effect that logs updates with proper cleanup.