This PR, helps in converting the parentNode to of type Fragment when the prop is of type element. We do this only if the prop's defaultValue element is of type fragment. This is to make sure, we are not converting the element type for named-slot. We do have a prop of type element which we are using for named-slot.
Here is a reference
https://github.com/teleporthq/teleport-code-generators/blob/development/examples/uidl-samples/project.json#L6726
If we don't follow the convention, we will be changing the structure of the layout. So, when you want this behaviour to kick-in. Always pass the root node of defaultValue of the prop to start with fragment.
This PR, helps in converting the parentNode to of type
Fragment
when the prop is of typeelement
. We do this only if the prop'sdefaultValue
element is of typefragment
. This is to make sure, we are not converting the element type fornamed-slot
. We do have a prop of type element which we are using for named-slot. Here is a reference https://github.com/teleporthq/teleport-code-generators/blob/development/examples/uidl-samples/project.json#L6726If we don't follow the convention, we will be changing the structure of the layout. So, when you want this behaviour to kick-in. Always pass the root node of defaultValue of the prop to start with
fragment
.