Skip to content

Instantly share code, notes, and snippets.

@leonmezu1
Created January 17, 2021 03:04
Show Gist options
  • Save leonmezu1/f6d11d67353cd22f19fd7a0ac587c822 to your computer and use it in GitHub Desktop.
Save leonmezu1/f6d11d67353cd22f19fd7a0ac587c822 to your computer and use it in GitHub Desktop.
import { createStore, applyMiddleware, compose } from "redux";
import thunk from "redux-thunk";
import reducer from "./reducers";
const store = createStore(
reducer,
compose(
applyMiddleware(thunk),
typeof window === "object" &&
typeof window.__REDUX_DEVTOOLS_EXTENSION__ !== "undefined"
? window.__REDUX_DEVTOOLS_EXTENSION__()
: (f) => f
)
);
export default store;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment