* 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)
| 18546 | * @param {*} forEachContext Context for forEachContext. |
| 18547 | */ |
| 18548 | function forEachChildren(children, forEachFunc, forEachContext) { |
| 18549 | if (children == null) { |
| 18550 | return children; |
| 18551 | } |
| 18552 | var traverseContext = getPooledTraverseContext(null, null, forEachFunc, forEachContext); |
| 18553 | traverseAllChildren(children, forEachSingleChild, traverseContext); |
| 18554 | releaseTraverseContext(traverseContext); |
| 18555 | } |
| 18556 | |
| 18557 | function mapSingleChildIntoContext(bookKeeping, child, childKey) { |
| 18558 | var result = bookKeeping.result, |
nothing calls this directly
no test coverage detected