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

Function traverseAllChildren

code/new-context-api/public/app.js:18503–18509  ·  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

18501 * @return {!number} The number of children in this subtree.
18502 */
18503function traverseAllChildren(children, callback, traverseContext) {
18504 if (children == null) {
18505 return 0;
18506 }
18507
18508 return traverseAllChildrenImpl(children, '', callback, traverseContext);
18509}
18510
18511/**
18512 * 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