Where do Angular signals replace RxJS, and where do they not?
Use signals for synchronous state and RxJS for events that happen over time.
Points worth saying
- A signal is a value you can read now.
- An observable is a sequence of events, including ones that have not happened.
- HTTP, websockets, and race cancellation stay in RxJS, then land in a signal at the edge.
A full answer
Signals are a good fit for state the template reads: the current user, the selected plan, a derived total. computed() derives a value without manual subscriptions. The template reads the signal and the dependency is tracked.
RxJS is still the right tool for streams: typing debounce, overlapping HTTP calls, retry, and websocket messages. Those problems are about time and cancellation, not about a single current value.
The boundary is toSignal or an explicit subscription in a service that writes a signal. Do that at the edge. Do not rebuild switchMap out of effects.
effects are for glue, such as writing to local storage when a signal changes. They are a poor place to set other signals in a chain. If you need derived state, use computed().
Mark your progress
Create a practice profile to mark this question.