Skip to content

Instantly share code, notes, and snippets.

@linuxenko
Last active April 12, 2016 09:53
Show Gist options
  • Select an option

  • Save linuxenko/9ff3017fb92795e8d210fe4688ec340e to your computer and use it in GitHub Desktop.

Select an option

Save linuxenko/9ff3017fb92795e8d210fe4688ec340e to your computer and use it in GitHub Desktop.
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