import {createStore, applyMiddleware, compose } from 'redux' import todoApp from './reducer/index' import thunk from 'redux-thunk' import createSagaMiddleware from 'redux-saga' import mySaga from './sagas' const sagaMiddleware = createSagaMiddleware() const composeEnhancers = typeof window === 'object' && window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__ ? window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__({ }) : compose; const enhancer = composeEnhancers( applyMiddleware(...[thunk, sagaMiddleware]), ); const store = createStore(todoApp, enhancer); sagaMiddleware.run(mySaga) export default store componentDidMount () { // axios.post('/queryBannerList', { // type: 1 // }).then(res => { // let list = res.data.result.list // store.