Skip to content

Instantly share code, notes, and snippets.

@nitin-rachabathuni
Last active October 13, 2018 17:00
Show Gist options
  • Save nitin-rachabathuni/146901a0b670ac4fb4be26863f01ca5e to your computer and use it in GitHub Desktop.
Save nitin-rachabathuni/146901a0b670ac4fb4be26863f01ca5e to your computer and use it in GitHub Desktop.
Redux init store with devTool
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