MCPcopy Create free account
hub / github.com/microsoft/SandDance / forEachChildren

Function forEachChildren

docs/external/js/react.development.js:1220–1228  ·  view source on GitHub ↗

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

(children, forEachFunc, forEachContext)

Source from the content-addressed store, hash-verified

1218
1219
1220 function forEachChildren(children, forEachFunc, forEachContext) {
1221 if (children == null) {
1222 return children;
1223 }
1224
1225 var traverseContext = getPooledTraverseContext(null, null, forEachFunc, forEachContext);
1226 traverseAllChildren(children, forEachSingleChild, traverseContext);
1227 releaseTraverseContext(traverseContext);
1228 }
1229
1230 function mapSingleChildIntoContext(bookKeeping, child, childKey) {
1231 var result = bookKeeping.result,

Callers

nothing calls this directly

Calls 3

getPooledTraverseContextFunction · 0.85
traverseAllChildrenFunction · 0.85
releaseTraverseContextFunction · 0.85

Tested by

no test coverage detected