-
Notifications
You must be signed in to change notification settings - Fork 46.4k
-
Notifications
You must be signed in to change notification settings - Fork 46.4k
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 and remove when a known attribute of a DOM component receives a Symbol as a value. #10512
Comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Do you want to request a feature or report a bug?
This is a possibly incorrect corner case which we should correct before finalizing the new behavior of unknown attributes. (See #10399 for more context on the changes to behavior with unknown attributes.)
If this happens with unknown attributes, we want to warn and then remove the attribute. The behavior should be consistent between known and unknown attributes.
What is the current behavior?
We currently throw a generic error when a Symbol is passed to a known attribute which expects a string.
If the current behavior is a bug, please provide the steps to reproduce and if possible a minimal demo of the problem via https://jsfiddle.net or similar (template: https://jsfiddle.net/84v837e9/).
Example:
https://jsfiddle.net/675gk050/1/
Also happens with spreading of objects in as props:
https://jsfiddle.net/2m985yt1/2/
What is the expected behavior?
We should warn and remove the attribute, since that is not a valid value.
Which versions of React, and which browser / OS are affected by this issue? Did this work in previous versions of React?
Recent react (15.*) and 16-beta as well.
The text was updated successfully, but these errors were encountered: