* Iterates through children that are typically specified as `props.children`. * * See https://reactjs.org/docs/react-api.html#react.children.foreach * * The provided forEachFunc(child, index) will be called for each * leaf child. * * @param {?*} children Children tree container. * @param {fu
(children, forEachFunc, forEachContext)
| 19323 | * @param {*} forEachContext Context for forEachContext. |
| 19324 | */ |
| 19325 | function forEachChildren(children, forEachFunc, forEachContext) { |
| 19326 | if (children == null) { |
| 19327 | return children; |
| 19328 | } |
| 19329 | var traverseContext = getPooledTraverseContext(null, null, forEachFunc, forEachContext); |
| 19330 | traverseAllChildren(children, forEachSingleChild, traverseContext); |
| 19331 | releaseTraverseContext(traverseContext); |
| 19332 | } |
| 19333 | |
| 19334 | function mapSingleChildIntoContext(bookKeeping, child, childKey) { |
| 19335 | var result = bookKeeping.result, |
nothing calls this directly
no test coverage detected