1 | import { applyMiddleware, createStore } from 'redux'
|
2 | import notify from './notify'
|
3 | import promiseMiddleware from './utils/redux-promise'
|
4 | import rootReducer from './reducers'
|
5 | import thunkMiddleware from 'redux-thunk'
|
6 |
|
7 | const middleware = applyMiddleware(
|
8 | thunkMiddleware,
|
9 | promiseMiddleware,
|
10 | notify
|
11 | )
|
12 |
|
13 | export default function configureStore(state) {
|
14 | return createStore(
|
15 | rootReducer,
|
16 | state,
|
17 | middleware
|
18 | )
|
19 | }
|