component-store

    0.3.2 • Public • Published

    component-store

    NPM version

    A way to manage react dumb component's state, then you can use it in plain, redux or mobx app.

    Install

    npm install component-store
    

    Usage

    normal style

    import store from 'component-store';
     
    class A extends React.Component {
    }
     
    export default store(defaultStore)(App)

    decorator style

    import store from 'component-store';
     
    @store(defaultStore)
    class A extends React.Component {
    }
     
    export default App;

    Api

    • store: Function(default store, onChange name='onChange')

    • onChange: Function(nextStore)

    Example

    http://flutejs.github.io/component-store/

    Keywords

    none

    Install

    npm i component-store

    DownloadsWeekly Downloads

    3

    Version

    0.3.2

    License

    MIT

    Last publish

    Collaborators

    • zinkey