Skip to content

sanity-io/react-rx

Repository files navigation

CI npm version

react-rx-some-smaller

Hooks and utilities for combining React with RxJS Observables

Features:

  • Works well with Observables emitting values synchronously. You don't pay the re-render-on-mount tax.
  • Lightweight. Implemented on top of a small React Hook based core.
  • Full TypeScript support.

This package offers two slightly different utilities for working with RxJS and React:

  • A set of utilities for creating Reactive components
  • A set of React hooks for using with observables with React

Although they share a lot of similarities, and reactiveComponent is built on top of useObservable are not intended to be used together inside the same component as they represent two different programming styles.



Contributing and releasing new versions to npm

This package lives in the react-rx monorepo and uses Changesets to manage versioning and publishing.

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

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, which uses npm Trusted Publishing (OIDC).

About

React + RxJS = <3

Topics

Resources

License

Code of conduct

Security policy

Stars

69 stars

Watchers

3 watching

Forks

Contributors