Fixed redux on production build
import { createStore, applyMiddleware } from "redux";
import thunk from "redux-thunk";
import rootReducer from "../reducers/rootReducer";
-import { composeWithDevTools } from 'redux-devtools-extension';
-export default function configureStore() {
- // return createStore(
- // rootReducer,
- // window.__REDUX_DEVTOOLS_EXTENSION__ &&
- // window.__REDUX_DEVTOOLS_EXTENSION__(),
- // applyMiddleware(thunk)
- // );
+const composeEnhancers = window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__ || compose;
+export default function configureStore() {
return createStore(
rootReducer,
- composeWithDevTools(
+ composeEnhancers(
applyMiddleware(thunk)
)
);
