1.0.7 • Published 6 years ago

use-rx v1.0.7

Weekly downloads
8
License
MIT
Repository
-
Last release
6 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

6 years ago

1.0.6

6 years ago

1.0.5

6 years ago

1.0.4

6 years ago

1.0.3

6 years ago

1.0.2

6 years ago

1.0.1

6 years ago

1.0.0

6 years ago