MCPcopy Create free account
hub / github.com/krasimir/react-in-patterns / forEachChildren

Function forEachChildren

code/third-party/public/app.js:18420–18427  ·  view source on GitHub ↗

* Iterates through children that are typically specified as `props.children`. * * See https://reactjs.org/docs/react-api.html#react.children.foreach * * The provided forEachFunc(child, index) will be called for each * leaf child. * * @param {?*} children Children tree container. * @param {fu

(children, forEachFunc, forEachContext)

Source from the content-addressed store, hash-verified

18418 * @param {*} forEachContext Context for forEachContext.
18419 */
18420function forEachChildren(children, forEachFunc, forEachContext) {
18421 if (children == null) {
18422 return children;
18423 }
18424 var traverseContext = getPooledTraverseContext(null, null, forEachFunc, forEachContext);
18425 traverseAllChildren(children, forEachSingleChild, traverseContext);
18426 releaseTraverseContext(traverseContext);
18427}
18428
18429function mapSingleChildIntoContext(bookKeeping, child, childKey) {
18430 var result = bookKeeping.result,

Callers

nothing calls this directly

Calls 3

getPooledTraverseContextFunction · 0.70
traverseAllChildrenFunction · 0.70
releaseTraverseContextFunction · 0.70

Tested by

no test coverage detected