crimx/observable-hooks
crimx/observable-hooks has 1,051 GitHub stars and 43 forks. GitHot measured 0 stars in 24 hours. Last checked 2026-11-09 11:29 UTC. Last push 2026-04-09.
⚛️☯️💪 React hooks for RxJS Observables. Concurrent mode safe.
Measured star growth
- in 24h
- 0
- in 7 days
- Update delayed
- in 15 days
- Update delayed
- in 1 month
- Update delayed
Net star changes over overlapping periods, not daily totals. Missing measurements are left blank. Stars measure attention, not software quality.
README.md
Originalobservable-hooks

Concurrent mode compatible React hooks for RxJS Observables. Simple, flexible, testable and performant.
- Seamless integration of React and RxJS.
- Concurrent mode compatible.
- Props, state and context to Observables.
- Observables to states and props events.
- Conditional rendering with stream of React Components.
- Render-as-You-Fetch with React Suspense.
- No
taphack needed. With Epic-like signature Observable operation is pure and testable.
- Full-powered RxJS. Do whatever you want with Observables. No limitation nor compromise.
- Fully tested. We believe in stability first. This project will always maintain a 100% coverage.
- Tiny and fast. A lot of efforts had been put into improving integration. This library should have zero visible impact on performance.
- Compatible with RxJS 6 & 7.
Installation
pnpm add observable-hooks
Why?
React added hooks for reusing stateful logic.
Observable is a powerful way to encapsulate both sync and async logic.
Testing Observables is also way easier than testing other async implementations.
With observable-hooks we can create rich reusable Components with ease.
What It Is Not
This library is not for replacing state management tools like Redux but to reduce the need of dumping everything into global state.
Using this library does not mean you have to turn everything observable which is not encouraged. It plays well side by side with other hooks. Use it only on places where it's needed.
At First Glance
import * as React from "react";
import { useObservableState } from "observable-hooks";
import { timer } from "rxjs";
import { switchMap, mapTo, startWith } from "rxjs/operators";
const App = () => {
const [isTyping, updateIsTyping] = useObservableState(
transformTypingStatus,
false
);
return (
<div>
<input type="text" onKeyDown={updateIsTyping} />
<p>{isTyping ? "Good you are typing." : "Why stop typing?"}</p>
</div>
);
};
// Logic is pure and can be tested like Epic in redux-observable
function transformTypingStatus(event$) {
return event$.pipe(
switchMap(() => timer(1000).pipe(mapTo(false), startWith(true)))
);
}
Usage
Read the docs at https://observable-hooks.js.org or ./docs.
Examples are in here. Play on CodeSandbox:
Note that there are also some useful utilities for common use cases to reduce garbage collection.
Developing
Install dependencies:
pnpm i
Run tests:
pnpm test
Lint code:
pnpm lint
Explore related projects
freeCodeCamp/freeCodeCamp
freeCodeCamp.org's open-source codebase and curriculum. Learn math, programming, and computer science for free.
458,829 starsdonnemartin/system-design-primer
Learn how to design large-scale systems. Prep for the system design interview. Includes Anki flashcards.
377,466 starsreact/react
The library for web and native user interfaces.
252,465 starsvuejs/vue
This is the repo for Vue 2. For Vue 3, go to https://github.com/vuejs/core
212,625 stars