React wrapper component for linking Kefir.js observables as props value
Usage example
import { KefirReact } from 'kefir-react';
const myProperty = Kefir.fromPoll(1, () => new Date()})
.toProperty(() => new Date());
class App extends React.Component {
render() {
return this.props.myValue;
}
}
const AppWrapped = KefirReact(
myProperty.map(myValue => { myValue }),
App
);
class Main extends React.Component {
render() {
return React.createElement(AppWrapped);
}
}
Exports KefirReact
factory and KefirReactComponent
react component
(props$, ComponentClass, [LoaderComponentClass]) -> WrappedComponentClass
So in props
of instantiated ComponentClass
there will be values from props$
LoaderComponentClass
is optional.
It'll be displayed until first value in props$
.
Use kefir-combine-object to create props$