this demo is use webpack + react + mobx
- git clone https://github.com/xiaosunJessica/react-mobx.git
- npm i
- npm run dev
- store redux对应单一的store, mobx对应多个store
- 数据管理 redux管理数据比较干净,mobx比较复杂
- 对store的修改 redux中的store只读,mobx可以对store进行修改
- 数据对象 redux是plain javascript, mobx通过使用observable对plain javascript进行包装
- 组件 redux分smart组件和dumb组件,mobx无区分,都是smart组件。
- test
- The different of the 'shallow' and 'mount'
- shallow render component like (shallow(<Cmpt.wrappedComponent />))
- store inject test component, you should import from YourStore, then new it to inject
- this test function can not test the 'addEventListener', and I have not resolve ???