Skip to content

Instantly share code, notes, and snippets.

@ShMcK
Created February 26, 2018 15:28
Show Gist options
  • Save ShMcK/fbfbb291e9537357f279f726ffb8f9c8 to your computer and use it in GitHub Desktop.
Save ShMcK/fbfbb291e9537357f279f726ffb8f9c8 to your computer and use it in GitHub Desktop.
Example of Redux Setup Complexity
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