-
Notifications
You must be signed in to change notification settings - Fork 47.1k
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
Use depth (not owner) to check for root components #558
Conversation
That makes sense to me, but I haven't enough experience in this part of the code base. cc @yungsters, @petehunt |
I don't think this is the right fix, but I don't have an alternate suggestion. Hmm... |
Why isn't this right? |
Isn't this a bug? I think owner isn't getting set correctly (it should be null if created outside of React, right?) |
Well, if you had specified a ref on the auxiliary component <Tooltip ref="tooltip" tooltip={<div ref="tip">{this.props.tooltipText}</div>}>
{this.props.text}
</Tooltip> then you'd still want the |
If it helps, note that |
Thanks for taking the time to explain. This looks reasonable to me. |
// Even though this.props.tooltip has an owner, updating it shouldn't | ||
// throw here because it's mounted as a root component | ||
React.renderComponent(this.props.tooltip, this.container); | ||
}, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: extra comma that our lint complains about (need to figure out linting these tests...)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fixed
Fixes #557.