mirror of
https://github.com/facebook/react.git
synced 2026-02-23 20:23:02 +00:00
## Summary - #26234 is reverted and replaced with a better approach - introduce a new global devtools variable to decouple the global hook's dependency on backend/console.js, and add it to react-devtools-inline and react-devtools-standalone With this PR, I want to introduce a new principle to hook.js: we should always be alert when editing this file and avoid importing from other files. In the past, we try to inline a lot of the implementation because we use `.toString()` to inject this function from the extension (we still have some old comments left). Although it is no longer inlined that way, it has became now more important to keep it clean as it is a de facto global API people are using (9.9K files contains it on Github search as of today). **File size change for extension:** Before: 379K installHook.js After: 21K installHook.js 363K renderer.js
The Firefox extension
The source code for this extension has moved to shells/webextension.
Modify the source code there and then rebuild this extension by running node build from this directory or yarn run build:firefox from the root directory.
Testing in Firefox
- Build the extension:
node build - Follow the on-screen instructions.
You can test upcoming releases of Firefox by downloading the Beta or Nightly build from the Firefox releases page and then following the on-screen instructions after building.