redux-devtools/packages/redux-devtools-extension
github-actions[bot] 11be87f31a
Version Packages (#1527)
* Version Packages

* Update lock file

---------

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Co-authored-by: Nathan Bierema <nbierema@gmail.com>
2023-11-04 21:26:10 +00:00
..
src Replace Action<unknown> with Action<string> (#1525) 2023-11-04 21:04:23 +00:00
.eslintignore Imprrove ability to tree-shake libraries (#1050) 2022-01-24 02:11:46 +00:00
.eslintrc.js chore(deps): update typescript-eslint monorepo to v6 (major) (#1436) 2023-09-03 22:56:58 -04:00
babel.config.esm.json Imprrove ability to tree-shake libraries (#1050) 2022-01-24 02:11:46 +00:00
babel.config.json Imprrove ability to tree-shake libraries (#1050) 2022-01-24 02:11:46 +00:00
CHANGELOG.md Version Packages (#1527) 2023-11-04 21:26:10 +00:00
package.json Version Packages (#1527) 2023-11-04 21:26:10 +00:00
README.md chore(deps): update dependency prettier to v3 (#1434) 2023-07-12 18:03:20 +00:00
tsconfig.json Imprrove ability to tree-shake libraries (#1050) 2022-01-24 02:11:46 +00:00

Redux DevTools Extension's helper

Join the chat at https://gitter.im/zalmoxisus/redux-devtools-extension

Usage

Install:

yarn add @redux-devtools/extension

and use like that:

import { createStore, applyMiddleware } from 'redux';
import { composeWithDevTools } from '@redux-devtools/extension';

const store = createStore(
  reducer,
  composeWithDevTools(
    applyMiddleware(...middleware),
    // other store enhancers if any
  ),
);

or if needed to apply extensions options:

import { createStore, applyMiddleware } from 'redux';
import { composeWithDevTools } from '@redux-devtools/extension';

const composeEnhancers = composeWithDevTools({
  // Specify here name, actionsDenylist, actionsCreators and other options
});
const store = createStore(
  reducer,
  composeEnhancers(
    applyMiddleware(...middleware),
    // other store enhancers if any
  ),
);

There are just a few lines of code. If you dont want to allow the extension in production, just use composeWithDevToolsDevelopmentOnly instead of composeWithDevTools.

License

MIT