MCPcopy Create free account
hub / github.com/danielstocks/react-sortable / forEachChildren

Function forEachChildren

bundle.js:2140–2147  ·  view source on GitHub ↗

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

(children, forEachFunc, forEachContext)

Source from the content-addressed store, hash-verified

2138 * @param {*} forEachContext Context for forEachContext.
2139 */
2140 function forEachChildren(children, forEachFunc, forEachContext) {
2141 if (children == null) {
2142 return children;
2143 }
2144 var traverseContext = getPooledTraverseContext(null, null, forEachFunc, forEachContext);
2145 traverseAllChildren(children, forEachSingleChild, traverseContext);
2146 releaseTraverseContext(traverseContext);
2147 }
2148
2149 function mapSingleChildIntoContext(bookKeeping, child, childKey) {
2150 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