Though I later found out that this question is longer valid for new versions of Redux, some readers were unaware of it, since nobody has pointed this out and everyone here was talking about excluding __REDUX_DEVTOOLS_EXTENSION_COMPOSE__
from compose enhancers during Redux Saga setup.
What I found out was there are few different Redux Devtools
This one is from the official repo by Dan Abramov
reduxjs/redux-devtools
is the NPM package which you want to add in your enhancers to use Redux Devtools in your project.
For Manual integration and exclusion in production checkout this page.
From the previous answers and comments to my old boilerplate code, this was the one used by all of them.
You add this devtools by __REDUX_DEVTOOLS_EXTENSION_COMPOSE__
to your enhancers.
const store = createStore(
reducer, /* preloadedState, */
development() &&
window.__REDUX_DEVTOOLS_EXTENSION__ && window.__REDUX_DEVTOOLS_EXTENSION__()
);
and in production it should be removed.
Reactotron is a macOS, Windows, and Linux app for inspecting your React JS and React Native apps built on Electron. This one is sweet. It is a cross-platform Electron app for inspecting React and React Native apps, including app state, API requests, perf, errors, sagas, and action dispatching.
You just plug it as your dev-dependency, so it will add nothing to the production build.
For the ones using Redux with Rematch, it's a different story.
Redux With Rematch
Rematch works with Redux Devtools out of the box. No configuration required.
init() // initialized with devtools
For manual integration,
init({
redux: {
devtoolOptions: {
disabled: production(),
},
},
})
You can also make rematch use redux-devtools-extension
or reactotron
. Checkout this page for more info.
__REDUX_DEVTOOLS_EXTENSION__
enhancer in yourcreateStore
call? If you are, you can make adding that conditional. – Roustabout