# react-rx

> React + RxJS =

Latest version **7.1.0** (published 2026-10-15) · MIT license · 0 weekly downloads

## Install

```sh
npm install react-rx
pnpm add react-rx
yarn add react-rx
bun add react-rx
```

## Health

**Score 75/100 (B)** — status: active.

Positive: has types; esm support; no vulnerabilities; has provenance; recently updated; high maintenance score; high quality score.

Warnings: low downloads.

## Facts

| | |
|---|---|
| Version | 7.1.0 |
| Published | 2026-10-15 |
| First published | 2015-05-07 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | ESM |
| Node | >=22.12 |
| Dependencies | 0 |
| Unpacked size | 106.9 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Provenance | attested (GitHub Actions) |
| GitHub stars | 70 |
| Author | Sanity.io <hello@sanity.io> |
| Maintainers | bjoerge, sanity-svc.npm, sanity-io |
| Keywords | action, behavior, concurrent, es6, events, external, hooks, observables, observe, pipe, react, react19, reactive, realtime, rx, rxjs, sanity, sanity-io, store, streams, subject, suspense, sync, typesafe, typescript, use |

## Links

- npm: https://www.npmjs.com/package/react-rx
- Repository: https://github.com/sanity-io/react-rx
- Homepage: https://react-rx.dev
- Issues: https://github.com/sanity-io/react-rx/issues
- npm.io page: https://npm.io/package/react-rx

## Recent versions

- 7.1.0 (latest) — 2026-10-15
- 7.0.0-next.6 (next) — 2026-09-02
- 4.2.1-canary.0 (canary) — 2025-09-22
- 3.0.0-crx-749.1 (crx-749) — 2024-06-09
- 3.0.0-0 (beta) — 2023-03-09
- 7.0.1 — 2026-09-23
- 7.0.0 — 2026-09-09
- 6.1.0 — 2026-09-07
- 6.0.1 — 2026-09-02
- 7.0.0-next.5 — 2026-08-26
- 7.0.0-next.4 — 2026-08-25
- 7.0.0-next.3 — 2026-08-25
- 7.0.0-next.2 — 2026-08-21
- 7.0.0-next.1 — 2026-08-21
- 7.0.0-next.0 — 2026-08-21
- … 116 more at https://npm.io/package/react-rx/versions

## README

[![CI](https://github.com/sanity-io/react-rx/actions/workflows/ci.yml/badge.svg?event=push)](https://github.com/sanity-io/react-rx/actions/workflows/ci.yml) [![npm version](https://img.shields.io/npm/v/react-rx.svg)](https://www.npmjs.com/package/react-rx)

[![react-rx-some-smaller](https://user-images.githubusercontent.com/81981/194187624-9abd09da-bf03-4886-b512-78c1f22fc2de.png)](https://react-rx.dev/)

> Hooks and utilities for combining React with RxJS Observables

Features:

- Predictable first paint — the required `initialValue` renders first, and observables are never subscribed during render (no render-phase side effects, server included).
- Non-blocking by default — `useObservable` defers store updates; reach for `useSyncObservable` for controlled inputs.
- Suspense-ready — `useObservablePromise` turns an observable into a `use()`-compatible promise for when there is no meaningful initial value.
- Shared by key — `createObservableCache` hands every consumer of a key the same observable, so they share one request and one settled promise instead of each suspending on its own.
- Lightweight. Implemented on top of a small React Hook based core.
- Full TypeScript support.

This package provides React hooks for working with RxJS Observables in your components.

## Requirements

- React `^19.2`
- RxJS `^7.2` — operators are imported from `'rxjs'` (not the deprecated `'rxjs/operators'` path). If you're still on an older RxJS, see the [RxJS import migration guide](https://rxjs.dev/guide/importing#how-to-migrate).

---

- [Guide](https://react-rx.dev/guide)
- [API reference](https://react-rx.dev/reference)
- [Migration (v4 → v5)](https://react-rx.dev/migrate/v4-to-v5)
- [Code examples](https://react-rx.dev/examples/simple)

---

# Contributing and releasing new versions to npm

This package lives in the [`react-rx` monorepo](https://github.com/sanity-io/react-rx) and uses [Changesets](https://github.com/changesets/changesets) to manage versioning and publishing.

When you make a change that should be released, add a changeset to your pull request:

```sh
pnpm changeset
```

Once pull requests with changesets are merged into the `current` branch, a "Version Packages" pull request is opened (and kept up to date) that bumps the affected package versions and updates their changelogs. Merging that pull request publishes the packages to npm through the [`Release` workflow](https://github.com/sanity-io/react-rx/actions/workflows/release.yml), which uses npm [Trusted Publishing](https://docs.npmjs.com/trusted-publishers) (OIDC).

---
_Source: https://npm.io/package/react-rx · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
