store文件的新建步骤
import rootReducer from '../store/reducers/index'
// 导入 redux-thunk , applyMiddleware
import { createStore, applyMiddleware } from 'redux'
// 导入composeWithDevTools
import { composeWithDevTools } from 'redux-devtools-extension'
import thunk from 'redux-thunk'
// 创建store实例并调用applyMiddleware将 thunk 添加到中间件列表中
const store = createStore(rootReducer, composeWithDevTools(applyMiddleware(thunk)))
// 导出实例
export default store