-
Notifications
You must be signed in to change notification settings - Fork 47k
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
Warn when a DOM element has unsupported property #6465
Warn when a DOM element has unsupported property #6465
Conversation
This commit updates the logic in ReactDOMUnknownPropertyDevTool such that it will warn when a DOM property not contained in the property whitelist is assigned to a React DOM element.
standardName != null || registrationName != null, | ||
'Unable to assign unsupported DOM property %s.', | ||
name | ||
); | ||
}; | ||
} |
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 updated the warning copy here to make it clearer what's going on. Happy to change this.
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.
The problem is that this error message doesn't specify the line number, as per the last sentence of my comment in #6459 (comment)
Never mind, I meant to comment on a different pull request. |
@nhunzaker: It's up to you. #6398 does solve a subtly different problem and hasn't been touched in almost a week, but this commit is going to depend on some incarnation of that PR so it will be tough to make progress on this until that gets finished. You might be able to adopt that PR (eg. merge it into here), fix it up, and the two of you can work together to get it merged. Up to you guys to figure out how to best proceed. Fair warning, #6398 may be a rough one to attempt as a first bug, as per #6062 (comment). I can offer my guidance on this bug, but ultimately the team would need to arrive at a consensus which means that implementation/design decisions would be up for debate, which can be a little frustrating for outside contributors. If you're looking for an easier way to get involved, I recommend looking at https://github.com/facebook/react/issues?q=is%3Aopen+is%3Aissue+label%3A%22good+first+bug%22 . Anyway, your call. This one would certainly be a valuable one to get solved! |
This commit updates the logic in ReactDOMUnknownPropertyDevTool such that it will warn when a DOM property not contained in the property whitelist is assigned to a React DOM element.
Basically a follow up to @jimfb's suggestion in #6459.