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
Why this matters: we are spreading the unionize variant value into a React component:
<div{...myVariant}/>
We expect the spreaded object to contain valid props for this React component, which it does, however it also passes the tag prop which is not valid. This results in invalid HTML.
IMO the runtime value should match the type. There should not be an excess property containing the tag—although I realise this would mean creating a new object, in order to remove the tag
The text was updated successfully, but these errors were encountered:
Maybe a better approach would be to leave the runtime semantics alone but to ensure that the type of the refined variant includes the tag property (but only when it will have one, i.e. when there is no value prop.)
Workaround: if we specify a
value
, we don't have this issue:Why this matters: we are spreading the unionize variant value into a React component:
We expect the spreaded object to contain valid props for this React component, which it does, however it also passes the tag prop which is not valid. This results in invalid HTML.
IMO the runtime value should match the type. There should not be an excess property containing the tag—although I realise this would mean creating a new object, in order to remove the tag
The text was updated successfully, but these errors were encountered: