An open API service indexing awesome lists of open source software.

https://github.com/mikroskeem/react-devtools-disable

This module provides an easy way to disable React Devtools browser extension in the production environment
https://github.com/mikroskeem/react-devtools-disable

devtools disable react react-devtools-disable

Last synced: about 2 months ago
JSON representation

This module provides an easy way to disable React Devtools browser extension in the production environment

Awesome Lists containing this project

README

          

# React Devtools disable(r)

This module provides an easy way to disable React Devtools browser extension in the production environment

## Usage
```javascript
import { disableDevToolsWhen } from 'react-devtools-disable';
import { isProdMode } from 'whatever'; // function

disableDevToolsWhen(isProdMode);
ReactDOM.render(..., ...);
```

or

```javascript
import { disableDevTools } from 'react-devtools-disable';

if (window.location.port !== 443) {
disableDevTools();
}
ReactDOM.render(..., ...);
```

## License
MIT