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

Function traverseAllChildren

code/third-party/public/app.js:18375–18381  ·  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

18373 * @return {!number} The number of children in this subtree.
18374 */
18375function traverseAllChildren(children, callback, traverseContext) {
18376 if (children == null) {
18377 return 0;
18378 }
18379
18380 return traverseAllChildrenImpl(children, '', callback, traverseContext);
18381}
18382
18383/**
18384 * 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