npm install --save redux-devtools-extension
const store = createStore(rootReducer,composeWithDevTools(applyMiddleware(...middleware)) );
const store = createStore(
reducer, /* preloadedState, */
+ window.__REDUX_DEVTOOLS_EXTENSION__ && window.__REDUX_DEVTOOLS_EXTENSION__()
);
//add middleware in store
window.__REDUX_DEVTOOLS_EXTENSION__ && window.__REDUX_DEVTOOLS_EXTENSION__()
window.__REDUX_DEVTOOLS_EXTENSION__ && window.__REDUX_DEVTOOLS_EXTENSION__()
/*
Redux toolkit by default enables devtools on all environments.
It is best practice to disable devtools on production.
However, some say having devtools enabled in production is not an issue.
*/
const store = configureStore({
reducer: rootReducer,
middleware: getDefaultMiddleware(),
// To disable devtools in production
devTools: process.env.NODE_ENV !== 'production',
})
const store = createStore(
reducer, /* preloadedState, */
+ window.__REDUX_DEVTOOLS_EXTENSION__ && window.__REDUX_DEVTOOLS_EXTENSION__()
);
import { createStore, applyMiddleware } from 'redux';
import { composeWithDevTools } from 'redux-devtools-extension';
const store = createStore(reducer, composeWithDevTools(
applyMiddleware(...middleware),
// other store enhancers if any
));
what a text to edit