Last active
October 13, 2018 17:00
-
-
Save nitin-rachabathuni/146901a0b670ac4fb4be26863f01ca5e to your computer and use it in GitHub Desktop.
Redux init store with devTool
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, compose } from "redux"; | |
import thunk from "redux-thunk"; | |
import rootReducer from "./reducers/RootReducer"; | |
const composeEnhancers = | |
typeof window === "object" && window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__ | |
? window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__({ | |
// Specify extension’s options like name, actionsBlacklist, actionsCreators, serialize... | |
}) | |
: compose; | |
export default function configureStore() { | |
return createStore(rootReducer, composeEnhancers(applyMiddleware(thunk))); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment