-
Notifications
You must be signed in to change notification settings - Fork 48.4k
Provide component reference in ReactDOMFiberTextarea warnings #13361
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Provide component reference in ReactDOMFiberTextarea warnings #13361
Conversation
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.
Nits
@@ -70,11 +71,13 @@ export function initWrapperState(element: Element, props: Object) { | |||
) { | |||
warning( | |||
false, | |||
'Textarea elements must be either controlled or uncontrolled ' + | |||
'%s contains an textarea with both value and defaultValue props. ' + |
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.
“a textarea”
@@ -404,7 +404,8 @@ describe('ReactDOMTextarea', () => { | |||
<textarea value="foo" defaultValue="bar" readOnly={true} />, | |||
), | |||
).toWarnDev( | |||
'Textarea elements must be either controlled or uncontrolled ' + | |||
'A component contains an textarea with both value and defaultValue props. ' + |
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.
Let’s change the test to have an owner?
✅ |
Thanks |
I noticed that
ReactDOMFiberInput.js
provides a reference to the component, if possible. Why not do the same forReactDOMFiberTextarea.js
as well :-)?