Closed jorgebucaran closed 7 years ago
Currently:
hx`<div class="hi">Hello</div>`
Produces (using a hyperscript-like function):
{ children: ["Hello"], data: { className: "hi" }, tag: "div" }
This requires your vdom engine to check if data has a className prop and use class instead, otherwise you end up with HTML elements that have both class and className attributes.
data
className
class
On the other hand, JSX correctly yields:
{ children: ["Hello"], data: { class: "hi" }, tag: "div" }
Related:
Currently:
Produces (using a hyperscript-like function):
This requires your vdom engine to check if
data
has aclassName
prop and useclass
instead, otherwise you end up with HTML elements that have bothclass
andclassName
attributes.On the other hand, JSX correctly yields:
Related: