Skip to content

Instantly share code, notes, and snippets.

@nitaliano
Created April 6, 2016 19:52
Show Gist options
  • Save nitaliano/ccf3e118ef1b612c178d4e91bab21a20 to your computer and use it in GitHub Desktop.
Save nitaliano/ccf3e118ef1b612c178d4e91bab21a20 to your computer and use it in GitHub Desktop.
import { createStore, combineReducers, applyMiddleware, compose } from 'redux';
import { routerReducer } from 'react-router-redux';
import thunk from 'redux-thunk';
import header from '../reducers/header';
import weather from '../reducers/weather';
import details from '../reducers/details';
import settings from '../reducers/settings';
export default function (initialState) {
const rootReducer = combineReducers({
header: header,
weather: weather,
details: details,
settings: settings,
routing: routerReducer
});
const store = createStore(rootReducer, initialState, compose(
applyMiddleware(thunk)
));
return store;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment