v0.20.230 - 11.2 / 9

resolve

Helper that runs the functions inside props.children and returns a memo of the result. The unwrapping happens inside a memo, so each function runs at most once per change.

props.children is typically an array of functions, components and plain data. It is not HTML; the elements are created when children are returned — either by handing props.children back as-is or by returning a new tree that references them.

Unlike Solid, props.children is not a getter. You don't need resolve to consume children — reach for it when you need to run the functions inside (to inspect them, or to avoid re-running them on every read). Accessing or modifying props.children directly as many times as you want has no cost.

resolve creates a memo owned by the caller, so anything it reads becomes a dependency of that memo — not of the surrounding effect. That matters when the caller is itself an effect and you want the resolve to be the tracking boundary.

# Arguments

nametypedescription
fnfnfunction holding the children.

# Snippet

# Children Caching

Filter children without causing re-renders

Filter the menu and count how many times the children rendered.