1.0.7 • Published 5 years ago

use-rx v1.0.7

Weekly downloads
8
License
MIT
Repository
-
Last release
5 years ago

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>)
} ;
1.0.7

5 years ago

1.0.6

5 years ago

1.0.5

5 years ago

1.0.4

5 years ago

1.0.3

5 years ago

1.0.2

5 years ago

1.0.1

5 years ago

1.0.0

5 years ago