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/

Versions

Current Tags

  • Version
    Downloads (Last 7 Days)
    • Tag
  • 0.3.2
    49
    • latest

Version History

  • Version
    Downloads (Last 7 Days)
    • Published
  • 0.3.2
    49
  • 0.3.1
    1
  • 0.3.0
    1
  • 0.2.0
    2
  • 0.1.0
    2

Package Sidebar

Install

npm i component-store

Weekly Downloads

51

Version

0.3.2

License

MIT

Last publish

Collaborators

  • zinkey