In React 16, unknown element props are now set as attributes: https://facebook.github.io/react/blog/2017/09/08/dom-attributes-in-react-16.html … But how do you set a property on an element?
What's the rationale for making class= an error but letting other attributes work?
-
-
If there exists a "canonical" React name then we prefer you use it. This makes custom components accepting DOM props have more JS-y APIs.
-
class/className is not the only one working this way. Same story for tabindex/tabIndex or arabic-form/arabicForm.
-
Similar: maxLength, there's a bunch. I'll be watching with interest to see whether this improves things!
End of conversation
New conversation -
Loading seems to be taking a while.
Twitter may be over capacity or experiencing a momentary hiccup. Try again or visit Twitter Status for more information.