redux 安装

 

 

store.js

 

import { createStore, compose, combineReducers, applyMiddleware } from 'redux'
import promise from 'redux-promise'
import thunk from 'redux-thunk'

const composeEnhancers = window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__ || compose

const store = createStore(
combineReducers({
Home
}),
composeEnhancers(applyMiddleware(thunk,promise))

)

export { store }    

posted @ 2020-05-12 10:10  秋帝  阅读(310)  评论(0编辑  收藏  举报