Last active
April 12, 2016 09:53
-
-
Save linuxenko/9ff3017fb92795e8d210fe4688ec340e to your computer and use it in GitHub Desktop.
This file contains hidden or 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 weatherApp from '../reducers/' | |
| import { createStore, applyMiddleware } from 'redux' | |
| import thunkMiddleware from 'redux-thunk' | |
| import createLogger from 'redux-logger' | |
| const loggerMiddleware = createLogger() | |
| const createStoreWithMiddleware = applyMiddleware( | |
| thunkMiddleware, // lets us dispatch() functions | |
| loggerMiddleware // neat middleware that logs actions | |
| )(createStore) | |
| export default function configureStore(initialState) { | |
| return createStoreWithMiddleware(weatherApp, initialState) | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment