react-with-rxjs
v2.0.0
Published
A set of hooks, HOCs, and components for creating and consuming RxJS observables.
Downloads
24
Maintainers
Readme
React with RxJS
A single API for binding RXJS Observables to your React components.
Install
npm install react-with-rxjs
Usage
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>
);
}
Documentation
Full documentation can be found here
License
MIT License | Copyright (c) 2022 Samuel Carnell