mobx-connect
Not official React bindings for mobX, but performant and flexible.
Installation
React mobX requires React 0.14 or later
npm i mobx--awesome-connect --save
This assumes that you’re using npm package manager with a module bundler like Webpack to consume CommonJS modules.
Use
In the root component
; const add = { storetodos;} const App = { return <Provide store=storetodos> <button onClick= >click me</button> this is Counter <ListView /> </Provide> }
In the children component
;; const ListView = { return <div> propsstore </div> } moduleexports = ListView;
Example
git clone
npm i
npm run build
cd example
npm start
Documentation
-
< Provide >
- has only
@parma
, store
- has only
-
connect()
@parma
now is null
Next
version | function |
---|---|
V1.1.1 | provide parma in connect function. user can listen data what they need |
V1.2.1 | provide second parma in connect function. user can mapActionsToProps |