-
Notifications
You must be signed in to change notification settings - Fork 47k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[DevTools] Support hook names for inline and standalone targets #21983
Comments
I find myself surprised that WASM is at all involved with RN, but that probably just means I don't know how RN works at a deep enough level. Despite this, I'm super interested in this feature for RN. |
WASM isn't involved with RN. WASM is used by the 'source-map' module, which DevTools runs internally to parse source maps. If you'd like to work on this feature, please do! :) |
Trying to read about this and starting with: https://github.com/mozilla/source-map#sourcemapconsumerinitializeoptions points to second option of using ArrayBuffer with contents of 'mappings.wasm'. Not experienced enough but maybe it could be unified that way for both targets. Or if that's not the case I assume this would work something like: if web then I wonder if build system could figure out to work like this |
There are plans to add support for inline and standalone packages soon. |
This issue has been automatically marked as stale. If this issue is still affecting you, please leave any comment (for example, "bump"), and we'll keep it open. We are sorry that we haven't been able to prioritize it yet. If you have any new additional information, please include it with your comment! |
Closing this issue after a prolonged period of inactivity. If this issue is still present in the latest release, please create a new issue with up-to-date information. Thank you! |
Named hooks is currently only enabled for DevTools browser extensions. This is because the source map parsing library (
'source-map'
) requires a WASM bundle to be supplied at runtime, and DevTools currently loads that using a browser API (chrome.extension.getURL
):react/packages/react-devtools-extensions/src/parseHookNames/index.js
Lines 20 to 21 in 9f88b53
Maybe we could refactor this so that non-browser targets copied the WASM from
node_modules
and bundled it along with the DevTools package? It would be nice to support this functionality for e.g. React Native (which usesreact-devtools-core
) and Code Sandbox (which usesreact-devtools-inline
).The text was updated successfully, but these errors were encountered: