[](https://www.npmjs.com/package/react-devtools-blocker) [](https://github.com/y
npm install react-devtools-blockerbash
npm install react-devtools-blocker
`
$3
`bash
yarn add react-devtools-blocker
`
๐ง Usage
> Note for Next.js 13+
> This package must be used inside a Client Component.
> Add "use client" at the top of your component file.
$3
`jsx
import DevToolsGuard from 'react-devtools-blocker';
function App() {
return (
<>
{/ Your app content /}
>
);
}
`
$3
`jsx
"use client";
import DevToolsGuard from 'react-devtools-blocker';
export default function Layout({ children }) {
return (
<>
{children}
>
);
}
`
โ๏ธ Props
| Prop | Type | Required | Default | Description |
|----------------|---------|----------|------------------------------|---------------------------------------------|
| redirectUrl | string | No | "https://www.google.com" | URL to redirect when DevTools are detected |
| debug | boolean | No | false | Enables console logs for debugging |
๐ Use Cases
Protect sensitive applications like:
- Online exams/testing platforms
- Digital product access
- Game logic protection
- Client-side business logic
- Anti-cheat mechanisms
โ ๏ธ Limitations
- Not 100% foolproof (no client-side solution can be)
- May trigger on mobile devices with unusual screen ratios
- Can be bypassed by determined users
๐ค Contributing
Pull requests are welcome! Please open an issue first to discuss changes.
๐ License
MIT ยฉ Pressbuddy Software Solutions