-
-
Notifications
You must be signed in to change notification settings - Fork 32.3k
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
[Link] Warn when using plain function component in component
#17825
Conversation
Details of bundle changes.Comparing: 83b8323...8df0d58
|
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.
Thanks. You need to run yarn docs:api
locally to see changes to the API docs and pass CI.
component
@Nikhil-Pavan-Sai Please run |
[Link] Warn when using plain function component in `component`
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 have reverted the new throw error as the discussion in #16454 didn't reach a consensus that it was justified. Sebastian had concerned about it. With hindsight, I'm not sure either it's the best path forward. I suspect it's related to #17119 (comment) but I think that we should better understand what's going on before add this defensive check.
@@ -32,7 +32,6 @@ describe('<Link />', () => { | |||
inheritComponent: Typography, | |||
mount, | |||
refInstanceof: window.HTMLAnchorElement, | |||
skip: ['componentProp'], |
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.
It's green.
@@ -142,7 +143,7 @@ Link.propTypes = { | |||
* The component used for the root node. | |||
* Either a string to use a DOM element or a component. | |||
*/ | |||
component: PropTypes.elementType, | |||
component: elementTypeAcceptingRef, |
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.
@Nikhil-Pavan-Sai Thanks! |
Closes #16454