A way to manage react dumb component's state, then you can use it in plain, redux or mobx app.
npm install component-store
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;
-
store: Function(default store, onChange name='onChange')
-
onChange: Function(nextStore)