use-rx
v1.0.7
Published
React custom hook that return a state carried by an observable managing subscription and unsubscription
Downloads
13
Maintainers
Readme
Use RX
React custom hook that return a state carried by an observable managing subscription and unsubscription.
usage:
import { useRx } from 'use-rx';
import { interval } from 'rxjs';
export const Counter: React.FC = () => {
const state = useRx(interval(300));
return (<h1>{state}</h1>)
} ;