
Security News
Axios Maintainer Confirms Social Engineering Attack Behind npm Compromise
Axios compromise traced to social engineering, showing how attacks on maintainers can bypass controls and expose the broader software supply chain.
react-devtool
Advanced tools
Easy solution to have your own internal devtool, unleash the DX of React
A powerful, extensible devtool for React applications with built-in UI components and plugin system
npm install react-devtool
# or
yarn add react-devtool
# or
pnpm add react-devtool
import { Devtool } from 'react-devtool';
function App() {
return (
<div>
{/* Your app content */}
<YourApp />
{/* Add Devtool at the root of your app */}
<Devtool />
</div>
);
}
The simplest way to get started is to add the Devtool component to your app:
import { Devtool } from 'react-devtool';
function App() {
return (
<>
<YourApp />
<Devtool />
</>
);
}
Add custom UI elements to your devtool:
import { Devtool } from 'react-devtool';
import { Button, Input, Tabs, Tab } from 'react-devtool/ui';
function App() {
return (
<>
<YourApp />
<Devtool>
<Input type="text" placeholder="Search..." />
<Button onClick={() => console.log('Clicked!')}>
Save Changes
</Button>
<Tabs defaultValue="tab1">
<Tab label="Feature A" value="tab1">
Content for Feature A
</Tab>
<Tab label="Feature B" value="tab2">
Content for Feature B
</Tab>
</Tabs>
</Devtool>
</>
);
}
Manage feature flags with reactive updates:
import { Devtool, flags } from 'react-devtool';
import { FeatureFlags, useFlag } from 'react-devtool/ui';
// Define your feature flags
const featureFlags = flags({
newUI: false,
experimentalFeature: true,
debugMode: false
});
function MyComponent() {
// Use flags in your components
const isNewUIEnabled = useFlag(featureFlags, 'newUI');
return (
<div>
{isNewUIEnabled ? <NewUI /> : <OldUI />}
</div>
);
}
function App() {
return (
<>
<MyComponent />
<Devtool>
<FeatureFlags
name="App Features"
values={featureFlags}
onChange={(key, value) => {
console.log(`Feature ${key} changed to ${value}`);
}}
/>
</Devtool>
</>
);
}
Use the Inspector component to debug complex data:
import { Devtool, values } from 'react-devtool';
import { Inspector } from 'react-devtool/ui';
const appState = values({
user: { id: 1, name: 'John Doe' },
settings: { theme: 'dark', notifications: true }
});
function App() {
return (
<>
<YourApp />
<Devtool>
<Inspector
data={appState.value}
expandLevel={2}
/>
</Devtool>
</>
);
}
<Devtool>The main devtool component that provides the devtool interface.
interface DevtoolProps {
children?: ReactNode;
}
<FeatureFlags>Component for managing feature flags with a UI.
interface FeatureFlagsProps {
name?: string;
values: Subscribable<Record<string, boolean>>;
onChange?: (key: string, value: boolean) => void;
}
<Inspector>Data inspector component for debugging complex objects.
interface InspectorProps {
data: any;
theme?: any;
expandLevel?: number;
table?: boolean;
className?: string;
}
React Devtool includes a comprehensive set of UI components:
Button - Customizable button with variantsToggle - Switch/toggle componentInput - Text input with label and validationSelect - Dropdown select componentRadio & RadioGroup - Radio button componentsButtonGroup - Group buttons togetherSection - Collapsible content sectionsTabs & Tab - Tabbed interfaceCodeBlock - Syntax highlighted code displayvalues(initialValue)Create a subscribable value container.
const state = values({ count: 0 });
// Subscribe to changes
state.subscribe((newValue) => {
console.log('State changed:', newValue);
});
flags(initialFlags)Create a subscribable feature flags container.
const featureFlags = flags({
feature1: true,
feature2: false
});
useFlag(flags, key)React hook to use a specific feature flag.
const isEnabled = useFlag(featureFlags, 'feature1');
React Devtool uses Tailwind CSS for styling and provides CSS variables for theming:
:root {
--color-wash: #ffffff;
--color-gray-40: #666666;
--color-gray-80: #cccccc;
--color-gray-90: #e6e6e6;
--color-gray-95: #f2f2f2;
--color-yellow-30: #ffd700;
--color-blue-30: #4169e1;
--color-red-30: #dc143c;
}
This project was built upon the amazing work of React Scan. We've adapted and extended their excellent UI components and devtool architecture to create React Devtool. Special thanks to the React Scan team for their innovative approach to React debugging tools.
We welcome contributions! Please see our Contributing Guide for details.
git checkout -b feature/amazing-feature)git commit -m 'Add some amazing feature')git push origin feature/amazing-feature)MIT © React Devtool
FAQs
Easy solution to have your own internal devtool, unleash the DX of React
We found that react-devtool demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
Axios compromise traced to social engineering, showing how attacks on maintainers can bypass controls and expose the broader software supply chain.

Security News
Node.js has paused its bug bounty program after funding ended, removing payouts for vulnerability reports but keeping its security process unchanged.

Security News
The Axios compromise shows how time-dependent dependency resolution makes exposure harder to detect and contain.