5.0.0-rc.2 • Published 8 years ago

kefir-react v5.0.0-rc.2

Weekly downloads
1
License
MIT
Repository
github
Last release
8 years ago

kefir-react

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);
    }
}

API

Exports KefirReact factory and KefirReactComponent react component

KefirReact

(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$

5.0.0-rc.2

8 years ago

5.0.0-rc.1

8 years ago

4.0.0

8 years ago

3.0.0

8 years ago

3.0.0-rc.3

8 years ago

3.0.0-rc.2

8 years ago

3.0.0-rc.1

8 years ago

2.0.0

9 years ago

1.0.0

9 years ago

0.1.0

9 years ago