
Security News
Attackers Are Hunting High-Impact Node.js Maintainers in a Coordinated Social Engineering Campaign
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.
react-devpeek
Advanced tools
A developer tool for debugging React state and local/session storage
react-devpeek is a lightweight debugging tool that helps React developers inspect and manipulate state management and browser storage at runtime. It provides an intuitive interface for viewing state snapshots and managing localStorage/sessionStorage directly in your app during development.

npm install react-devpeek
# or
yarn add react-devpeek
# or
pnpm add react-devpeek
Add the DevPeek component to your application's root component:
import ReactDevPeek from "react-devpeek";
function App() {
return (
<>
<YourApp />
<ReactDevPeek />
</>
);
}
DevPeek can connect to any state management library using adapters:
import ReactDevPeek from "react-devpeek";
import { useCounterStore } from "./stores/counterStore";
import { useUserStore } from "./stores/userStore";
function App() {
return (
<>
<YourApp />
<ReactDevPeek
stateAdapters={[
{
name: "Counter Store",
getState: useCounterStore.getState,
subscribe: useCounterStore.subscribe,
},
{
name: "User Store",
getState: useUserStore.getState,
subscribe: useUserStore.subscribe,
},
]}
/>
</>
);
}
import ReactDevPeek from "react-devpeek";
import { ThemeContext } from "./contexts/ThemeContext";
import { UserContext } from "./contexts/UserContext";
function App() {
// Create adapters for context
const themeContextAdapter = {
name: "Theme Context",
getState: () => React.useContext(ThemeContext),
// No subscribe method for Context - DevPeek will poll periodically
};
const userContextAdapter = {
name: "User Context",
getState: () => React.useContext(UserContext),
};
return (
<>
<YourApp />
<ReactDevPeek stateAdapters={[themeContextAdapter, userContextAdapter]} />
</>
);
}
The ReactDevPeek component accepts the following props:
| Prop | Type | Default | Description |
|---|---|---|---|
showInProduction | boolean | false | Show DevPeek in production environments |
position | 'top-left' | 'top-right' | 'bottom-left' | 'bottom-right' | 'bottom-right' | Position of the toggle button |
theme | 'light' | 'dark' | 'system' | 'system' | UI theme |
defaultOpen | boolean | false | Open the panel by default |
stateAdapters | StateAdapter[] | [] | Array of state adapters to connect |
enableLocalStorage | boolean | true | Enable localStorage monitoring |
enableSessionStorage | boolean | true | Enable sessionStorage monitoring |
interface StateAdapter {
// Display name for the adapter
name: string;
// Function that returns the current state
getState: () => any;
// Optional subscription function that calls a listener when state changes
// Should return a function to unsubscribe
subscribe?: (listener: () => void) => (() => void) | void;
}
<ReactDevPeek position="top-left" />
// Set theme explicitly
<ReactDevPeek theme="dark" />
// Use system preference
<ReactDevPeek theme="system" />
const [isDevToolOpen, setDevToolOpen] = useState(false);
<ReactDevPeek defaultOpen={isDevToolOpen} />;
// Only monitor localStorage, not sessionStorage
<ReactDevPeek enableSessionStorage={false} />
// Only monitor sessionStorage, not localStorage
<ReactDevPeek enableLocalStorage={false} />
To develop locally:
Clone the repository
git clone https://github.com/Socdev-africa/react-devpeek.git
cd react-devpeek
Install dependencies
npm install
Run the demo app
npm run demo
Build the library
npm run build
Run tests
npm test
To see a live demo of React DevPeek:
# Clone the repository
git clone https://github.com/Socdev-africa/react-devpeek.git
# Navigate to the project
cd react-devpeek
# Install dependencies
npm install
# Run the demo
npm run demo
This will start a development server with a demo application showcasing various features of React DevPeek.
React DevPeek supports all modern browsers including:
MIT © SocDev Africa
FAQs
A developer tool for debugging React state and local storage
We found that react-devpeek 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
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.

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.