redux的使用1
1、如何在项目中规范应用redux?
2、包含四个文件
3、第一个store.js


import {createStore,applyMiddleware}from 'redux'
import thunk from 'redux-thunk'
import {composeWithDevtools} from 'redux-devtools-extension'
import reducers from './reducers'
export default createStore(reducers,composeWithDevtools(applyMiddleware(thunk)))
4、第二个reducers.js


5、第三个action

5、第四个action-types.js

6、项目中引入


7、插件推荐


浙公网安备 33010602011771号