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
Since react-templates automatically turns the class attribute into className it's not possible to define a working class attribute on custom elements (e.g. WebComponents).
which doesn't work because custom elements in react expect a class attribute instead of className, as explained in facebook/react#4933:
TLDR: Custom elements DO work in React. You must use class instead of className because the custom element spec requires that we allow users to specify a className attribute and we need to preserve that functionality for custom elements.
As a fix for this, I suggest that we map back className into class for custom elements.
The text was updated successfully, but these errors were encountered:
Since
react-templates
automatically turns theclass
attribute intoclassName
it's not possible to define a working class attribute on custom elements (e.g. WebComponents).Example:
generates:
which doesn't work because custom elements in react expect a
class
attribute instead ofclassName
, as explained in facebook/react#4933:As a fix for this, I suggest that we map back
className
intoclass
for custom elements.The text was updated successfully, but these errors were encountered: