|
|
@ -1,17 +1,11 @@ |
|
|
|
import { applyMiddleware, createStore } from 'redux' |
|
|
|
import { applyMiddleware, createStore } from 'redux' |
|
|
|
import thunkMiddleware from 'redux-thunk' |
|
|
|
import thunkMiddleware from 'redux-thunk' |
|
|
|
import { createLogger } from 'redux-logger' |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
const rootReducer = function () {} |
|
|
|
const rootReducer = function () {} |
|
|
|
|
|
|
|
|
|
|
|
export default configureStore |
|
|
|
export default configureStore |
|
|
|
|
|
|
|
|
|
|
|
const loggerMiddleware = createLogger() |
|
|
|
const createStoreWithMiddleware = applyMiddleware(thunkMiddleware)(createStore) |
|
|
|
|
|
|
|
|
|
|
|
const createStoreWithMiddleware = applyMiddleware( |
|
|
|
|
|
|
|
thunkMiddleware, |
|
|
|
|
|
|
|
loggerMiddleware |
|
|
|
|
|
|
|
)(createStore) |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
function configureStore (initialState) { |
|
|
|
function configureStore (initialState) { |
|
|
|
return createStoreWithMiddleware(rootReducer, initialState) |
|
|
|
return createStoreWithMiddleware(rootReducer, initialState) |
|
|
|