Back to Recharts

Recharts hook inspector

storybook/stories/API/hooks/HookInspector.mdx

3.8.11.1 KB
Original Source

import enableInspector from './assets/enable-recharts-hook-inspector.png'; import showToolbar from './assets/show-toolbar.png'; import inspectorPreview from './assets/inspector-preview.png';

Recharts hook inspector

Hook inspector is a tool that allows you to inspect the state of hooks in Recharts storybook. It can be useful for debugging and understanding how the hooks are working and what they return.

How to open the hook inspector:

  1. Navigate to the story you want to inspect.
  2. In the top navigation bar, click on the "Enable Recharts hook inspector" button - it looks like a little hook.
  3. The hook inspector will open next to the story. Enable or disable individual hooks by clicking on the checkboxes next to their names.

How to enable the hook inspector

What the hook inspector looks like

Troubleshooting

If you don't see the toolbar, make sure that you have "Show toolbar" enabled in the storybook settings