1.0.7 • Published 4 years ago

use-rx v1.0.7

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

4 years ago

1.0.6

4 years ago

1.0.5

4 years ago

1.0.4

4 years ago

1.0.3

4 years ago

1.0.2

4 years ago

1.0.1

4 years ago

1.0.0

4 years ago