Created
February 26, 2018 15:28
-
-
Save ShMcK/fbfbb291e9537357f279f726ffb8f9c8 to your computer and use it in GitHub Desktop.
Example of Redux Setup Complexity
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 { createStore, applyMiddleware, compose } from 'redux' | |
import thunk from 'redux-thunk' | |
import api from '../middleware/api' | |
import rootReducer from '../reducers' | |
import DevTools from '../containers/DevTools' | |
const store = (preloadedState) => { | |
return createStore( | |
rootReducer, | |
preloadedState, | |
compose( | |
applyMiddleware(thunk, api), | |
DevTools.instrument() | |
) | |
) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment