Created
November 3, 2015 19:10
-
-
Save lesniakania/ad366b35c57f72c4605c to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { createStore, combineReducers, applyMiddleware, compose } from 'redux'; | |
import { routerStateReducer } from 'redux-router'; | |
import thunk from 'redux-thunk'; | |
import SubmissionsListReducer from './reducers/SubmissionsListReducer'; | |
import routes from './routes'; | |
const reducers = combineReducers({ | |
submissions: SubmissionsListReducer, | |
router: routerStateReducer | |
}); | |
export function configureStore(initialState, createHistory, reduxReactRouter) { | |
const createStoreWithMiddleware = compose( | |
applyMiddleware(thunk), | |
reduxReactRouter({ routes, createHistory }) | |
)(createStore); | |
return createStoreWithMiddleware(reducers, initialState); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment