GX2015: component with signals has no top-level HTML element
A component has signals, and its markup has no HTML element at the top level.
Cause
A component has signals, and its markup has no HTML element at the top level. Gx writes the first values of the signals on the first top-level HTML element. A component tag at the top level does not take them.
Example
package cart
props {
Children gx.Node
}
<article>{p.Children}</article>package cart
signals {
Open bool = false
}
<Card>
<button on:click={$Open = !$Open}>Details</button>
<p show={$Open}>The details.</p>
</Card>gx check reports:
cart/Panel.gx:3:1: GX2015: a component with signals needs a top-level HTML element to hold their first valuesFix
Put the markup of the component inside one HTML element, for example <div>.