The `useOpenResource` hook is now used to open links. Currently, the `<>` icon for the component stacks and the link in the bottom of the components stack. But it'll also be used for many new links like stacks. If this new option is configured, and this is a local file then this is opened directly in the external editor. Otherwise it fallbacks to open in the Sources tab or whatever the standalone or inline is configured to use. <img width="453" height="252" alt="Screenshot 2025-07-24 at 4 09 09 PM" src="https://github.com/user-attachments/assets/04cae170-dd30-4485-a9ee-e8fe1612978e" /> I prominently surface this option in the Source pane to make it discoverable. <img width="588" height="144" alt="Screenshot 2025-07-24 at 4 03 48 PM" src="https://github.com/user-attachments/assets/0f3a7da9-2fae-4b5b-90ec-769c5a9c5361" /> When this is configured, the "Open in Editor" is hidden since that's just the default. I plan on deprecating this button to avoid having the two buttons going forward. Notably there's one exception where this doesn't work. When you click an Action or Event listener it takes you to the Sources tab and you have to open in editor from there. That's because we use the `inspect()` mechanism instead of extracting the source location. That's because we can't do the "throw trick" since these can have side-effects. The Chrome debugger protocol would solve this but it pops up an annoying dialog. We could maybe only attach the debugger only for that case. Especially if the dialog disappears before you focus on the browser again. |
||
|---|---|---|
| .. | ||
| .circleci | ||
| chrome | ||
| edge | ||
| firefox | ||
| flow-typed | ||
| icons | ||
| popups | ||
| src | ||
| build.js | ||
| deploy.chrome.html | ||
| deploy.edge.html | ||
| deploy.firefox.html | ||
| deploy.html | ||
| deploy.js | ||
| improveImages.mjs | ||
| main.html | ||
| package.json | ||
| panel.html | ||
| README.md | ||
| utils.js | ||
| webpack.backend.js | ||
| webpack.config.js | ||
This is the source code for the React DevTools browser extension.
Installation
The easiest way to install this extension is as a browser add-on:
Local development
You can also build and install this extension from source.
Prerequisite steps
DevTools depends on local versions of several NPM packages1 also in this workspace. You'll need to either build or download those packages first.
1 Note that at this time, an experimental build is required because DevTools depends on the createRoot API.
To install all necessary dependencies, run the following command from the root of the repository:
yarn install
Build from source
To build dependencies from source, run the following command from the root of the repository:
yarn build-for-devtools
Download from CI
To use the latest build from CI, run the following commands starting from the root of the repository:
cd scripts/release
yarn install
./download-experimental-build.js
Build steps
Once the above packages have been built or downloaded, you can build the extension by running:
cd packages/react-devtools-extensions/
yarn build:chrome # => packages/react-devtools-extensions/chrome/build
yarn run test:chrome # Test Chrome extension
yarn build:firefox # => packages/react-devtools-extensions/firefox/build
yarn run test:firefox # Test Firefox extension
yarn build:edge # => packages/react-devtools-extensions/edge/build
yarn run test:edge # Test Edge extension