Skip to content

Instantly share code, notes, and snippets.

@codeaholicguy
Last active December 25, 2016 17:12
Embed
What would you like to do?
import {createStore, applyMiddleware} from 'redux';
import createLogger from 'redux-logger';
import {browserHistory} from 'react-router';
import {routerMiddleware} from 'react-router-redux';
import thunk from 'redux-thunk';
import rootReducer from './reducers/index';
const logger = createLogger();
const router = routerMiddleware(browserHistory);
const createStoreWithMiddleware = applyMiddleware(thunk, router, logger)(createStore);
export function configureStore(initialState) {
return createStoreWithMiddleware(rootReducer, initialState);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment