01The wrong question is "signals or RxJS?"
A quick definition first, because the two get compared as if they were the same kind of thing. A signal is a value container. You read it by calling it (count()), you change it with set() or update(), and Angular tracks which templates and computations read it, so only those update when it changes. An Observable, from the RxJS library, is a stream. It delivers values over time (maybe none, maybe thousands), and operators let you cancel, combine and reshape those values along the way.
Most teams adopting signals ask which one should win. In a real enterprise codebase that's the wrong framing. Signals are synchronous, always have a current value and are read directly in templates. Observables are streams of events that may never emit, emit many times, or need cancelling halfway through.
Those are different jobs. The codebases that struggle are the ones that force one tool into the other's role: a BehaviorSubject for every piece of UI state, or an effect() trying to debounce an API call.
Everything below is written against Angular 22, the current major since June 2026. Apart from the resource APIs in section 04, it also applies to Angular 20 and 21, where effect(), linkedSignal() and toObservable() became stable.
02A rule the whole team can apply
-
01
State lives in signals
Selected row, open panel, current filter, form step: anything that has a value right now belongs in a
signal(). Templates read it directly, and OnPush just works. -
02
Derived values are
computed()If a value can be calculated from other state, it's a
computed, never a second signal you keep in sync by hand. That one rule removes a whole class of stale-UI bugs. -
03
Derived but editable is
linkedSignal()A selected contact should reset when a new client loads, but the user can still pick a different one.
linkedSignalhandles that case: it recomputes from its source and stays writable in between, so nobody writes an effect to reset it. -
04
Events over time stay in RxJS
Debouncing keystrokes, cancelling stale requests, retrying, polling, merging WebSocket messages: that's what operators like
switchMapanddebounceTimeexist for. -
05
Bridge at the edges
toObservable()turns a signal into a stream when you need operators;toSignal()brings the result back for the template. The bridge lives in one place, not scattered. -
06
effect()is for side effects onlyWriting to
localStorage, syncing a CSS class, logging. If an effect sets another signal, it should almost always have been acomputed. Angular's own guide says effects "should be the last API you reach for". -
07
HTTP stays an Observable
HttpClientreturns cold Observables for good reasons: cancellation and interceptors. Convert at the component boundary, not inside every service method. For read-only data, a resource can do that conversion for you (section 04). -
08
Mutations stay plain method calls
Save, delete and approve are commands. Call the API from a store method, then update state with the result. Resources are built for reading data, and the docs warn against using them for writes.
03Where teams get it wrong
The most common mistake I see in code review is effect() used as a watcher that copies one signal into another. It works, but it hides data flow and can produce an extra render with inconsistent state. A computed expresses the same thing declaratively and is always consistent.
The second is subscribing manually in components to feed a signal. toSignal handles subscription and teardown for you, and makes the initial value explicit. That forces the question every async UI has to answer: what does the screen show before the data arrives?
The third is subtler. toObservable doesn't emit on every set(). It's driven by an effect, so it emits once the signal has settled: set a signal to 1, 2 and 3 in a row and the stream only sees 3. For a search filter that's exactly what you want. It surprises people who expect a replay of every change, and it trips up unit tests that set a signal and check the stream on the very next line.
The fourth is error handling. The store example in section 05 uses catchError(() => of([])), which keeps the list on screen when the API fails but also hides the failure. Drop the catchError and toSignal rethrows the error whenever the signal is read, which breaks the template instead. In both cases nobody decided what the user should see. Pick what the screen should show on error and model it as state. The resource APIs make that easier, because the error is part of their state from the start.
04Resources: async data as signals
Angular 22 made the resource APIs stable: resource() for promise-based loaders, rxResource() for loaders that return an Observable, and httpResource() for plain HTTP reads. Each one takes a reactive params function and a loader. When the params change, the resource loads again and exposes the result through signals: value(), hasValue(), isLoading(), error() and status(). If the params change while a request is still in flight, the resource aborts it, which is the cancellation you'd otherwise build with switchMap.
That covers the most common reason a component touched RxJS at all: load something whenever an id changes. It doesn't cover everything. A resource has no debounce, so search-as-you-type still belongs in the RxJS pipeline from section 05. And because a changed param aborts the running request, a resource is the wrong tool for saving data, since it could cancel a write halfway.
import { Injectable, computed, inject, linkedSignal, signal } from '@angular/core';
import { rxResource } from '@angular/core/rxjs-interop';
import { ClientsApi, Contact } from './clients.api';
@Injectable()
export class ClientDetailStore {
private api = inject(ClientsApi);
// state: which client is open (null = none)
readonly clientId = signal<string | null>(null);
// async read: reloads when clientId changes, aborts a stale request,
// and stays idle while params is undefined
readonly client = rxResource({
params: () => this.clientId() ?? undefined,
stream: ({ params: id }) => this.api.get(id),
});
// derived: hasValue() guards value(), which throws in the error state
readonly contacts = computed<Contact[]>(() =>
this.client.hasValue() ? this.client.value().contacts : [],
);
// derived but editable: resets to the first contact when the list changes
readonly selectedContact = linkedSignal(() => this.contacts()[0] ?? null);
open(id: string) {
this.clientId.set(id);
}
retry() {
this.client.reload();
}
}
The template can then handle every state without a single subscription:
@if (store.client.isLoading()) {
<app-detail-skeleton />
} @else if (store.client.error()) {
<app-load-error (retry)="store.retry()" />
} @else if (store.client.hasValue()) {
<app-client-header [client]="store.client.value()" />
<app-contact-list
[contacts]="store.contacts()"
[(selected)]="store.selectedContact" />
}
Loading, error and retry are now part of the store's state instead of something each component works out on its own. If you're on Angular 20 or 21, the resource APIs exist but are still experimental there. For those versions the toSignal pattern in the next section is the safer default.
05One store, both tools, clear boundaries
Here the filter is state, so it's a signal. Fetching is an event stream that needs debouncing and cancellation, so it's RxJS. The result comes back as a signal for the template, and the derived count is a computed.
import { Injectable, computed, inject, signal } from '@angular/core';
import { toObservable, toSignal } from '@angular/core/rxjs-interop';
import { catchError, debounceTime, of, switchMap } from 'rxjs';
import { Client, ClientFilter, ClientsApi } from './clients.api';
@Injectable()
export class ClientsStore {
private api = inject(ClientsApi);
// state
readonly filter = signal<ClientFilter>({ search: '', status: 'active' });
// events over time → RxJS, then back to a signal
readonly clients = toSignal(
toObservable(this.filter).pipe(
debounceTime(200),
switchMap((f) => this.api.list(f).pipe(catchError(() => of([])))),
),
{ initialValue: [] as Client[] },
);
// derived
readonly overdueCount = computed(
() => this.clients().filter((c) => c.overdue).length,
);
setSearch(search: string) {
this.filter.update((f) => ({ ...f, search }));
}
}
The two stores split along the same line as the rules. Free-text search needs debounceTime, so it goes through RxJS. Opening a record by id is a plain read keyed by state, so it's a resource. Both end up as signals, and the template never has to know which one did the work.
The takeaway
Signals for state, computed for anything derived, linkedSignal when derived state also needs to be editable, resources for read-only async data, RxJS for events over time, and toSignal/toObservable at the boundary. Agree on that rule once and most "which one should I use?" debates disappear from code review.
Sources
- Angular versioning and releases (Angular 22 release date and support windows)
- Effects guide ("the last API you reach for")
- linkedSignal API (stable since v20)
- RxJS interop with signals (toSignal options, error behaviour, toObservable batching)
- Async reactivity with resources (status signals, aborts, reads only)
- rxResource API and httpResource API (stable since v22)