children Helper in SolidJS
From the SolidJS cheat sheet · Props Utilities · verified Jul 2026
children Helper
Resolve and manipulate children reactively with the children() utility.
tsx
// Quick Reference
import { children } from "solid-js";
import type { ParentProps } from "solid-js";
const List = (props: ParentProps) => {
const resolved = children(() => props.children);
return <ul>{resolved()}</ul>;
};💡 Use children() to resolve lazy children into a memoized reactive value
⚡ Call resolved.toArray() to get an array of child elements for inspection
📌 ParentProps<T> is a convenience type that adds children to your props interface
🟢 Only use children() when you need to inspect or transform children — otherwise just use props.children
childrenpropscomposition