1.1.1 • Published 9 months ago

use-prevent-dev-tools v1.1.1

Weekly downloads
-
License
MIT
Repository
github
Last release
9 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

9 months ago

1.1.0

9 months ago

1.0.9

9 months ago

1.0.7

9 months ago

1.0.6

9 months ago

1.0.5

9 months ago

1.0.4

9 months ago

1.0.3

9 months ago

1.0.2

9 months ago

1.0.1

9 months ago

1.0.0

9 months ago