By: @BTroncone
Also check out my lesson @ngrx/store in 10 minutes on egghead.io!
Update: Non-middleware examples have been updated to ngrx/store v2. More coming soon!
Table of Contents
By: @BTroncone
Also check out my lesson @ngrx/store in 10 minutes on egghead.io!
Update: Non-middleware examples have been updated to ngrx/store v2. More coming soon!
Table of Contents
const { compose, mapProps, withHandlers, lifecycle } = Recompose; | |
const { observable, action } = mobx; | |
const { inject, observer, Provider } = mobxReact; | |
const { PropTypes } = React; | |
// store | |
// ============================ | |
const counterStore = observable({ | |
// for primitive values, wrap the value inside a observable, | |
// or wrap it in an plain js object |
Why use proxy
to achieve mobx? Because mobx is very good, but because of Object.defineProperty
restrictions, no way to write very comfortable.
So dob was born, I only list the changes after using dob, as well as the experience of store manager framework practice summary.
dob not only overrides mobx using proxy, but also comes with dependency injection store management.