Create a gist now

Instantly share code, notes, and snippets.

What would you like to do?
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