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

Function traverseAllChildren

code/composition/public/app.js:19280–19286  ·  view source on GitHub ↗

* Traverses children that are typically specified as `props.children`, but * might also be specified through attributes: * * - `traverseAllChildren(this.props.children, ...)` * - `traverseAllChildren(this.props.leftPanelChildren, ...)` * * The `traverseContext` is an optional argument that is

(children, callback, traverseContext)

Source from the content-addressed store, hash-verified

19278 * @return {!number} The number of children in this subtree.
19279 */
19280function traverseAllChildren(children, callback, traverseContext) {
19281 if (children == null) {
19282 return 0;
19283 }
19284
19285 return traverseAllChildrenImpl(children, '', callback, traverseContext);
19286}
19287
19288/**
19289 * Generate a key string that identifies a component within a set.

Callers 3

forEachChildrenFunction · 0.70
countChildrenFunction · 0.70

Calls 1

traverseAllChildrenImplFunction · 0.70

Tested by

no test coverage detected