SolidJSS
SolidJSโ€ข10mo agoโ€ข
22 replies
Paul

Default behaviour to have undefined in children?

const b = children(() => props.children).toArray();
console.log(b);

const c = children(() => props.children).toArray().filter((item) => !!item);
console.log(c);


Am I expected to filter out undefined nodes in children?

I have 2 uses cases and I'm seeing undefined peppered in with other nodes.

Is this the default behaviour with solidjs?
Screenshot_2025-05-10_at_13.19.07.png
Was this page helpful?