Redux Devtools
Redux Devtools
For Chrome
2. For Firefox
from Mozilla Add-ons;
or build it with npm i && npm run build:firefox and load the extension's
folder ./build/firefox (just select a file from inside the dir).
3. For Electron
just specify REDUX_DEVTOOLS in electron-devtools-installer.
use remote-redux-devtools.
Usage
Note that starting from v2.7, window.devToolsExtension was renamed
to window.__REDUX_DEVTOOLS_EXTENSION__ / window.__REDUX_DEVTOOLS_EXTENSION_COM
POSE__.
1. With Redux
const composeEnhancers =
(typeof window !== 'undefined' &&
window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__) ||
compose;
In case ESLint is configured to not allow using the underscore dangle, wrap it
like so:
+ /* eslint-disable no-underscore-dangle */
const store = createStore(
reducer, /* preloadedState, */
window.__REDUX_DEVTOOLS_EXTENSION__ &&
window.__REDUX_DEVTOOLS_EXTENSION__()
);
+ /* eslint-enable */
Note that when the extension is not installed, we’re using Redux compose here.
const composeEnhancers =
typeof window === 'object' && window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__
? window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__({
// Specify extension’s options like name, actionsDenylist,
actionsCreators, serialize...
})
: compose;
To specify extension’s options:
1.5 For React Native, hybrid, desktop and server side Redux
apps
For React Native we can use react-native-debugger, which already included the
same API with Redux DevTools Extension.
For most platforms, include Remote Redux DevTools's store enhancer, and from
the extension's context menu choose 'Open Remote DevTools' for remote
monitoring.