You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
var Hello = React.createClass({
render: function() {
return <div className={Symbol('foo')}>Hello {this.props.name}</div>;
}
});
// rendering this throws "TypeError: can't convert symbol to string react-dom.js:2028:11"
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:
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: