-
Notifications
You must be signed in to change notification settings - Fork 4.2k
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
Remove findDOMNode usage from the NavigableToolbar component #11401
Conversation
@@ -0,0 +1,132 @@ | |||
|
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.
Thank goodness for the new files. These components were always the hardest to find because of their non-obvious prior bundling.
@@ -0,0 +1,132 @@ | |||
|
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: Trim leading newline.
} | ||
|
||
const forwardedNavigableContainer = ( props, ref ) => { | ||
return <NavigableContainer { ...props } forwardedRef={ ref } />; |
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.
Minor: I think the ownProps
pattern we've adopted elsewhere (e.g. withSelect
) when we know we're just passing through props directly, to avoid wastefully iterating over the props in the pass-through.
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.
I don't like that we have to change the inner component's implementation to adapt to this. I find it ok for higher-order components that need to be very performant but personally prefer to avoid it in regular components.
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.
I'd agree in the sense of not surfacing it on the public API, but it seems perfectly fine (and arguably preferable) for internal pass-through components.
3cb6e00
to
f4a88cb
Compare
Related #11360
This PR ends up more complex that I though.
forwardRef
support to the NavigableMenu component