* 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)
| 19220 | * @param {*} forEachContext Context for forEachContext. |
| 19221 | */ |
| 19222 | function forEachChildren(children, forEachFunc, forEachContext) { |
| 19223 | if (children == null) { |
| 19224 | return children; |
| 19225 | } |
| 19226 | var traverseContext = getPooledTraverseContext(null, null, forEachFunc, forEachContext); |
| 19227 | traverseAllChildren(children, forEachSingleChild, traverseContext); |
| 19228 | releaseTraverseContext(traverseContext); |
| 19229 | } |
| 19230 | |
| 19231 | function mapSingleChildIntoContext(bookKeeping, child, childKey) { |
| 19232 | var result = bookKeeping.result, |
nothing calls this directly
no test coverage detected