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

Function countChildren

code/new-context-api/public/app.js:18619–18621  ·  view source on GitHub ↗

* Count the number of children that are typically specified as * `props.children`. * * See https://reactjs.org/docs/react-api.html#react.children.count * * @param {?*} children Children tree container. * @return {number} The number of children.

(children, context)

Source from the content-addressed store, hash-verified

18617 * @return {number} The number of children.
18618 */
18619function countChildren(children, context) {
18620 return traverseAllChildren(children, emptyFunction.thatReturnsNull, null);
18621}
18622
18623/**
18624 * Flatten a children object (typically specified as `props.children`) and

Callers

nothing calls this directly

Calls 1

traverseAllChildrenFunction · 0.70

Tested by

no test coverage detected