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
I'm making an enzyme-inferno-adapter, but I've hit some problems getting the last few tests to pass.
Enzyme requires the className to be inside props. This is fine normally, because we can convert the inferno VNode tree to an enzyme RST tree. But when you call the Enzmye contains function, enzyme compares the RST node to the newly created VNode. The RST node has className inside props, the inferno VNode has className on the vNode.
Because enzyme is checking a VNode against an RST Node. This could be an issue to raise with Enzyme, but if there isn't a reason for Inferno to have className outside props, it would improve compatibility to add it to props.
Observed Behaviour
Inferno has className on the vNode
Expected Current Behaviour
Inferno should include className in the props
The text was updated successfully, but these errors were encountered:
className was moved from props to vNode because its the most common property of any html element. It has quite big impact on performance also, because when className is at the root and its the only prop. We don't need to loop props in diff.
I'm making an enzyme-inferno-adapter, but I've hit some problems getting the last few tests to pass.
Enzyme requires the
className
to be insideprops
. This is fine normally, because we can convert the inferno VNode tree to an enzyme RST tree. But when you call the Enzmyecontains
function, enzyme compares the RST node to the newly created VNode. The RST node hasclassName
insideprops
, the inferno VNode has className on the vNode.Example:
VNode:
This means we can't call a method like this:
Because enzyme is checking a VNode against an RST Node. This could be an issue to raise with Enzyme, but if there isn't a reason for Inferno to have className outside props, it would improve compatibility to add it to props.
Observed Behaviour
Inferno has className on the vNode
Expected Current Behaviour
Inferno should include className in the props
The text was updated successfully, but these errors were encountered: