Angular now has two ways to react to change: signals and RxJS observables. They overlap enough to cause confusion and differ enough that picking the wrong one makes code harder to read. The rule I use is short: signals for state, RxJS for events.
What a signal is good at
A signal is a value that knows who is reading it. When the value changes, Angular updates exactly the templates and computations that depend on it.
const items = signal<CartItem[]>([]);
const total = computed(() => items().reduce((sum, i) => sum + i.price * i.qty, 0));
total is always in sync with items. There is no subscription to manage and no chance of forgetting to unsubscribe. A signal always has a current value, so a template can read it at any moment without an async pipe or a null check for the "not emitted yet" case.
Use signals for anything you would describe as "the current something": the selected tab, the form draft, the logged-in user, the list on screen.
What RxJS is good at
An observable is a stream of things that happen over time. It has no current value; it has events. That makes it the right tool when timing is part of the problem:
- wait 300 ms after the last keystroke before searching
- cancel the previous HTTP request when a new one starts
- retry a failed call three times with a delay
- combine a WebSocket feed with a polling fallback
const results$ = query$.pipe(
debounceTime(300),
distinctUntilChanged(),
switchMap((q) => this.api.search(q)),
);
Writing that with signals and effects means rebuilding debounceTime and switchMap by hand, and getting cancellation wrong along the way.
Bridging the two
Most real features need both: an event stream to fetch the data, and state to show it. Angular provides the bridge in @angular/core/rxjs-interop.
// stream in, state out
readonly results = toSignal(results$, { initialValue: [] });
// state in, stream out
readonly query$ = toObservable(this.query);
A pattern that works well: keep user input in a signal, convert it to an observable for the async part, and convert the result back to a signal for the template. The component reads signals only, and RxJS stays inside the data layer where its operators earn their place.
Where effects fit
effect() runs code when signals change. It is for side effects that leave Angular: writing to local storage, calling a charting library, logging. It is not for copying one signal into another; that is what computed() is for. If an effect sets a signal, there is usually a computed hiding in it.
A quick decision list
- Is it a value the template shows? Signal.
- Is it derived from other values?
computed. - Does it involve time, cancellation or retries? RxJS.
- Does it need to touch something outside Angular?
effect. - Is it an HTTP call whose result you display? RxJS to fetch,
toSignalto show.
You do not have to migrate existing RxJS code. New components read more simply with signals for their state, and the streams you already have keep doing what streams do best.