UNPKG

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