Created
April 6, 2016 19:52
-
-
Save nitaliano/ccf3e118ef1b612c178d4e91bab21a20 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 { 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