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

Function traverseAllChildren

code/styling/public/app.js:19142–19148  ·  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

19140 * @return {!number} The number of children in this subtree.
19141 */
19142function traverseAllChildren(children, callback, traverseContext) {
19143 if (children == null) {
19144 return 0;
19145 }
19146
19147 return traverseAllChildrenImpl(children, '', callback, traverseContext);
19148}
19149
19150/**
19151 * 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