react-kefir
Connect Kefir observables to React components
npm install --save react-kefir
ReactComponent): ReactComponent
Connector(component:This higher-order component automatically subscribes to observable props and keeps the wrapped component updated. That allows us to treat continuous values as effectively discrete.
Usage
Given a component (A
),
let <span>propsv</span>
and an infinite stream of values (S
),
let _i = 0let S =
•---•--->---•---•--->0 1 ... n n+1
apply connector, and render:
A =
Now, sit back and observe the passage of time!