v0.14.134 - 37.4 / 46.2

resolve

Utility to resolve props.children. It returns a memo. This utility helps to unwrap the functions contained on them. It does in a memo so functions are unwrapped only once.

props.children is most of the time an array of functions/components and/or data. It does not contain HTML, it is created when in need, once you return either `props.children` or a new set of children.

Unlike Solid, props.children is not a getter. You do not need the resolve helper to use props.children unless you are attempting to run the possible functions/components in them, or to do caching to prevent re renders. There's no downside on using, accessing or modifying props.children many times.

The resolve helper causes tracking and changes the context/scope on which things run.

# 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.