MCPcopy Create free account
hub / github.com/Lucifier129/react-lite / forEachChildren

Function forEachChildren

examples/simple/react.js:4238–4245  ·  view source on GitHub ↗

* Iterates through children that are typically specified as `props.children`. * * The provided forEachFunc(child, index) will be called for each * leaf child. * * @param {?*} children Children tree container. * @param {function(*, int)} forEachFunc * @param {*} forEachContext Context for forE

(children, forEachFunc, forEachContext)

Source from the content-addressed store, hash-verified

4236 * @param {*} forEachContext Context for forEachContext.
4237 */
4238function forEachChildren(children, forEachFunc, forEachContext) {
4239 if (children == null) {
4240 return children;
4241 }
4242 var traverseContext = ForEachBookKeeping.getPooled(forEachFunc, forEachContext);
4243 traverseAllChildren(children, forEachSingleChild, traverseContext);
4244 ForEachBookKeeping.release(traverseContext);
4245}
4246
4247/**
4248 * PooledClass representing the bookkeeping associated with performing a child

Callers

nothing calls this directly

Calls 1

traverseAllChildrenFunction · 0.70

Tested by

no test coverage detected