-
Notifications
You must be signed in to change notification settings - Fork 46.9k
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
React DevTools 5.3.1 -> 6.0.0 #31058
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
Is #28584 handled in the update? |
@hoxyq just a heads-up: it seems there was an issue with the release to the Chrome Web Store. The latest version of React Dev Tools (5.3.1 from 7/3/2024) is still the only one available there. The new version is currently available only on Firefox and Edge. |
I am aware of this, and actively working on unblocking this. We have some issues with our account at Chrome Extensions store, which we are trying to resolve ASAP. |
It is published now. |
Did this remove the Earlier I used to do this: __REACT_DEVTOOLS_GLOBAL_HOOK__.rendererInterfaces.get(1).getSourceForFiber(<some fiber here>); If yes, what would be the alternative to get the source for a react fiber? |
Yes, it did. Technically, React DevTools hook should not be treated as public API, so any breaking changes are expected. The main reason for removal is that React DevTools now operates with its own instance of a Node, which is not necessarily Fiber. This is done to support Server Components. |
It was surely used by https://www.locatorjs.com/ to open the component source using the option + click shortcut |
@piotrski But locatorjs works only on dev environment (they use |
I'm building an AI agent to add event listeners to your frontend code, just by selecting an element on your deployed website. For this to work, there is prerequisite that you need to upload the code's sourcemaps. Earlier I used to do it like this __REACT_DEVTOOLS_GLOBAL_HOOK__.rendererInterfaces.get(1).getSourceForFiber(e.__fiber); With this I used to get the minified sources, and then using sourcemaps, I used to decode the original location of the DOM node. Essentially what I need is the jsx callsite, when the element is being called and rendered in the codebase. |
This will only be available in React 19.1+ (this is currently in I am okay with adding some public API to React DevTools, something like But I don't think that this should be part of the extension code. Basically, your product only works if user has React DevTools installed. |
@hoxyq |
Yeah, you can try to reverse-engineer the whole thing. But you have to account for different version of React: they might have different internals and constants. I would start from |
@hoxyq Thank you for providing me with the starting point. |
@hoxyq I have the similar problem.In my chrome extension, i need to get the source info by the inspected element.Without the API getSourceForFiber,how can i get the source info? |
Full list of changes:
enableSiblingPrerendering
in experimental channel (gnoff in #30952)