1.1.1 • Published 10 months ago

use-prevent-dev-tools v1.1.1

Weekly downloads
-
License
MIT
Repository
github
Last release
10 months ago

use-prevent-dev-tools

A React hook that prevents opening the browser's developer tools in production mode.

Installation

npm install use-prevent-dev-tools

Usage

import React from "react";
import usePreventDevTools from "use-prevent-dev-tools";

const App = () => {
  //To lock the developer tools, set lockDevTools to true.

  const devtoolsOpen = usePreventDevTools({ lockDevTools: false });

  return (
    <div>
      <h1>My React App</h1>
      {devtoolsOpen && <p>Developer tools are open!</p>}
      {!devtoolsOpen && <p>Developer tools are closed.</p>}
    </div>
  );
};

export default App;

Author

Yunus Emre Çıracı
LinkedIn

1.1.1

10 months ago

1.1.0

10 months ago

1.0.9

10 months ago

1.0.7

10 months ago

1.0.6

10 months ago

1.0.5

10 months ago

1.0.4

10 months ago

1.0.3

10 months ago

1.0.2

10 months ago

1.0.1

10 months ago

1.0.0

10 months ago