A single API for binding RXJS Observables to your React components.
npm install react-with-rxjs
const useTicks = bind(() => {
return { tick: interval(100).pipe(take(1000)) };
});
function Ticks() {
const { tick } = useTicks();
return (
<div style={{ textAlign: 'center' }}>
<h2>Timer: {tick}</h2>
</div>
);
}
Full documentation can be found here
MIT License | Copyright (c) 2022 Samuel Carnell