Diagnostics
LUM2004: Component called as a function
A component is called as a function instead of rendered with JSX.
Severity: error · Category: reactivity (2xxx)
Reported by: the compiler.
#What it means
{Card({ title })} runs Card inside the caller: it gets no owner of its own, its props are not
reactive getters, and cleanups, context and boundaries attach to the wrong component.
#Example
export function List(props: { items: string[] }) {
return <ul>{props.items.map((item) => Item({ label: item }))}</ul>;
}