Created
April 14, 2017 16:03
-
-
Save tecsyscom/a55455d5ef8304a43c69391141f542c6 to your computer and use it in GitHub Desktop.
configstore for redux
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, applyMiddleware } from 'redux' | |
import thunkMiddleware from 'redux-thunk' | |
import createLogger from 'redux-logger' | |
import rootReducer from './reducers' | |
const loggerMiddleware = createLogger() | |
export default function configureStore(preloadedState) { | |
return createStore( | |
rootReducer, | |
preloadedState, | |
applyMiddleware( | |
thunkMiddleware, | |
loggerMiddleware | |
) | |
) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment