-
Notifications
You must be signed in to change notification settings - Fork 46.4k
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
RFC: ReactInstrumentation.debugTool.onSetHostNode(debugID, node) #6834
Comments
Sounds reasonable to me, but how are you going to fire it for SFCs when it becomes disassociated? |
It would only be called for DOM components. React DevTools would then use the ReactComponentTreeDevtool to establish the closest (DOM) component with a host node. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
We will need a way to get host nodes in React DevTools with the new API. We currently get them by reaching into
ReactDOMComponentTree
directly but I propose to transition to using devtool API (#5306) for this so that other renderers can provide their own host nodes when they become available.I propose that the renderer code would emit something like
when node becomes associated and
when it is deassociated.
For DOM renderer, it would happen here.
Then we would add
getHostNode()
to ReactComponentTreeDevtool that would handleonSetHostNode
event.Does this sound reasonable? Longer term it would make something like this possible in userland.
The text was updated successfully, but these errors were encountered: