redux-devtools/packages/redux-devtools-inspector-monitor
renovate[bot] fe9a3674e0
chore(deps): update all non-major dependencies (#1605)
* chore(deps): update all non-major dependencies

* Format

* Temporarily downgrade @types/redux-logger

---------

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Nathan Bierema <nbierema@gmail.com>
2024-02-08 18:01:24 -05:00
..
demo chore(deps): update all non-major dependencies (#1605) 2024-02-08 18:01:24 -05:00
src fix(deps): update dependency jsondiffpatch to ^0.6.0 (#1586) 2024-01-23 21:48:11 -05:00
.eslintignore Imprrove ability to tree-shake libraries (#1050) 2022-01-24 02:11:46 +00:00
.eslintrc.js [inspector-monitor] Replace jss with Emotion (#1560) 2023-12-12 04:02:35 +00:00
babel.config.esm.json [inspector-monitor] Replace jss with Emotion (#1560) 2023-12-12 04:02:35 +00:00
babel.config.json [inspector-monitor] Replace jss with Emotion (#1560) 2023-12-12 04:02:35 +00:00
CHANGELOG.md Version Packages (#1577) 2023-12-18 02:32:58 +00:00
demo.gif refactor(redux-devtools-inspector-monitor): rename package (#633) 2020-09-10 12:37:19 -04:00
LICENSE.md refactor(redux-devtools-inspector-monitor): rename package (#633) 2020-09-10 12:37:19 -04:00
package.json chore(deps): update all non-major dependencies (#1605) 2024-02-08 18:01:24 -05:00
README.md Add ESM builds (#997) 2022-01-10 15:41:53 +00:00
tsconfig.json [inspector-monitor] Add explicit return types (#1573) 2023-12-16 17:10:27 +00:00

redux-devtools-inspector-monitor

npm version

A state monitor for Redux DevTools that provides a convenient way to inspect "real world" app states that could be complicated and deeply nested. Created by @alexkuz and merged from alexkuz/redux-devtools-inspector into reduxjs/redux-devtools monorepo.

Installation

yarn add @redux-devtools/inspector-monitor

Usage

You can use Inspector as the only monitor in your app:

containers/DevTools.js
import React from 'react';
import { createDevTools } from '@redux-devtools/core';
import { InspectorMonitor } from '@redux-devtools/inspector-monitor';

export default createDevTools(<InspectorMonitor />);

Then you can render <DevTools> to any place inside app or even into a separate popup window.

Alternative, you can use it together with DockMonitor to make it dockable.
Consult the DockMonitor README for details of this approach.

Read how to start using Redux DevTools.

Features

The inspector displays a list of actions and a preview panel which shows the state after the selected action and a diff with the previous state. If no actions are selected, the last state is shown.

You may pin a certain part of the state to only track its changes.

Props

Name Type Description
theme Object or string Contains either base16 theme name or object, that can be base16 colors map or object containing classnames or styles.
invertTheme Boolean Inverts theme color luminance, making light theme out of dark theme and vice versa.
supportImmutable Boolean Better Immutable rendering in Diff (can affect performance if state has huge objects/arrays). false by default.
tabs Array or function Overrides list of tabs (see below)
diffObjectHash Function Optional callback for better array handling in diffs (see jsondiffpatch docs)
diffPropertyFilter Function Optional callback for ignoring particular props in diff (see jsondiffpatch docs)

If tabs is a function, it receives a list of default tabs and should return updated list, for example:

defaultTabs => [...defaultTabs, { name: 'My Tab', component: MyTab }]

If tabs is an array, only provided tabs are rendered.

component is provided with action and other props, see ActionPreview.jsx for reference.

Usage example: redux-devtools-inspector-monitor-test-tab.

License

MIT