npm / react-rx
react-rx
What changed in react-rx 3 to 7, from its official release notes, upgrade guides and advisories. Sources checked 2026-12-05.
34 breaking3 deprecations7 new APIs and options6 behavior and defaults1 tooling10 fixes and other
See which of these apply to your code, ranked, in your agent:
npx @unstale/cli initreact-rx 713 changes
Breaking changes 7
A request that emits no value fails with EmptyError, and failures are never cached.
ObservablePromise no longer subclasses Promise; it wraps a plain promise, avoiding Hermes recursion and making derived promises plain Promise instances. instanceof Promise is now false.
useObservable and useSyncObservable no longer subscribe during render; subscriptions start when the component commits, and the resolved initialValue renders first.
The initialValue argument is now required; omitting it is a type error and throws a TypeError during render.
The hook is removed. Replace it with useObservableSubject and move its pipeline to where its output is consumed.
The hook no longer subscribes during a mounting render. Fetches start when a non-disabled consumer commits, when a live consumer swaps observable identity, or when preloadObservablePromise is called.
initialValue is required; omitting it is a type error, and JavaScript callers trigger a render-time error. It renders until the observable emits.
New APIs and options 2
Adds a method to forget every key in the observable cache at once.
Adds a keyed cache of shared observables for request-like sources, letting callers of a key share one request and its settled promise.
Behavior and default changes 4
Releases a key ttl after its last subscriber leaves; the same ttl applies to abandoned requests and entries that were never subscribed to.
The cached observable ends at its first value, stays open, and truncates later emissions or errors; use first() or firstValueFrom rather than waiting for completion.
Setting disabled to true now guarantees zero subscriptions.
On the server, this function is a no-op that returns an inert pending promise and neither subscribes nor touches the cache.
react-rx 69 changes
Breaking changes 3
Resolves initialValue once per hook instance and caches it, stabilizing pre-emission snapshots. Values passed on later renders are ignored until remount; keep initializers pure.
Setting disabled to true now means zero subscriptions, even when the observable is rebuilt every render.
When initialValue is provided, the hook skips render-phase warm-up and first shows that value; it subscribes on commit. SSR renders initialValue without subscribing, and sync emissions arrive after mount.
Deprecations 3
Calling useObservable without initialValue is deprecated ahead of v7, where the argument is required; passing undefined explicitly retains v6 types and behavior.
Deprecated ahead of its removal in v7; useObservableSubject provides a migration path for pushing events and reading the resulting observable.
Calling useSyncObservable without initialValue is deprecated ahead of v7, where the argument is required.
New APIs and options 1
Adds a hook returning an observable of pushed values and a referentially stable handler; its Subject is scoped to the component instance, with only the observable side exposed.
Fixes and other changes 2
Resolves initialValue once per hook instance and caches it, stabilizing pre-emission snapshots and the server snapshot. Values passed on later renders are ignored until remount; keep initializers pure.
After the hook receives an emission, replacement observables on later renders are warmed during render so components that rebuild observables every render settle instead of looping.
react-rx 513 changes
Breaking changes 8
CommonJS builds are no longer published; the package is ESM-only.
The module format changes from CJS + ESM to ESM-only.
Node >=22.12 is required in v5.
React ^19.2 is required in v5.
Import operators from rxjs instead of rxjs/operators.
RxJS ^7.2 is required in v5.
Store updates are deferred with useDeferredValue; urgent renders keep the previous value while a background render catches up.
New hook preserves v4's synchronous behavior and strict getServerSnapshot contract; use it for controlled inputs or a mechanical migration.
New APIs and options 3
Adds a Suspense-ready data-fetching API returning a use()-compatible promise, with disabled and ttl options.
Adds a Suspense-ready data-fetching hook that returns a use()-compatible promise, with disabled and ttl options.
Provides the exact v4 synchronous behavior, including the strict server snapshot.
Fixes and other changes 2
Defers the observable identity and its value as one snapshot; when the identity changes, the hook falls back to the live value so the previous identity's value never renders under the new one.
Restores the ponyfill so effect events see the latest values in memo and forwardRef components.
react-rx 45 changes
Breaking changes 3
The published exports map no longer includes the source condition; import and require continue to resolve dist/index.js and dist/index.cjs.
The src directory is no longer included in the published package, so consumers can no longer access it from the tarball.
Subscribes eagerly with delayed refcount expiry, changing observable unsubscription timing and potentially causing race conditions when side effects respond to emissions.
Tooling 1
Releases now use Changesets-based releases with npm trusted publishing; this changes the project’s release workflow, not runtime behavior.
Fixes and other changes 1
Fixes a memory leak when observables complete or error synchronously upon subscription, and prevents stale cached errors from replaying on later mounts instead of re-subscribing.
react-rx 321 changes
Breaking changes 13
Removed the context export.
Removed the element export.
Removed the forwardRef export.
Throws errors from the observable in getSnapshot().
Removed the handler export.
Removed the reactiveComponent export.
Removed the rxComponent export.
Requires rxjs v7 and above.
Removed the state export.
Removed the deprecated useAsObservable export.
Removed useMemoObservable; applications using this export must stop importing it.
Removed the useWithObservable export.
Removed the deprecated WithObservable export.
New APIs and options 1
Added useObservableEvent.
Behavior and default changes 2
Allows React 19.
Uses native useSyncExternalStore.
Fixes and other changes 5
Disposes a cache entry when its observable terminates.
Improves SSR support by implementing getServerSnapshot.
Improves the accuracy of useObservable's type.
Infers the return type of useObservable.
Supports error boundaries.