
Security News
New CVE Forecasting Tool Predicts 47,000 Disclosures in 2025
CVEForecast.org uses machine learning to project a record-breaking surge in vulnerability disclosures in 2025.
react-devtools
Advanced tools
react-devtools
If you need to debug a React page somewhere other than Chrome on desktop (a mobile browser, an embedded webview, safari, etc), the react-devtools
package is for you! It is also useful if your app is inside an iframe.
It works both with React DOM and React Native.
Install the package:
npm install --save-dev react-devtools
Add a script to your package.json
:
"scripts": {
// ...
"devtools": "react-devtools"
}
Now run npm run devtools
to launch the standalone DevTools app.
The final step depends on your rendering target.
You don't need to do anything else. Just make sure your app is running in foreground in the simulator, and DevTools will connect to it.
Add import 'react-devtools'
to the top of your entry file.
import 'react-devtools'; // Put it first!
import ReactDOM from 'react-dom';
Make sure that your react-devtools
import comes before your react-dom
import.
And don't forget to remove the import before shipping to production!
By default DevTools listen to port 8097
on localhost
.
If you need to customize host, port, or other settings, see the react-devtools-core
package instead.
npm run backend:watch
and npm run standalone:watch
in ../react-devtools-core
npm start
in this folderReact Native uses react-devtools-core
as a dependency.
Unfortunately, due to RN Packager aggressive caching of node_modules
, it is very inconvenient to develop against it.
The way I do it is by changing this require to be relative, and then running watch-and-rsync
-o=start -s=../react-devtools-core -t=~/<YOUR PATH TO PROJECT DIR>/react-native/Libraries/Core/Devtools/react-devtools-core
. This circumvents RN Packager caching, and if you are also runing npm run backend:watch
in ../react-devtools-core
, rebuilds on each change.
FAQs
Use react-devtools outside of the browser
The npm package react-devtools receives a total of 90,769 weekly downloads. As such, react-devtools popularity was classified as popular.
We found that react-devtools demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 11 open source maintainers 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
CVEForecast.org uses machine learning to project a record-breaking surge in vulnerability disclosures in 2025.
Security News
Browserslist-rs now uses static data to reduce binary size by over 1MB, improving memory use and performance for Rust-based frontend tools.
Research
Security News
Eight new malicious Firefox extensions impersonate games, steal OAuth tokens, hijack sessions, and exploit browser permissions to spy on users.