* 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)
| 19185 | * @param {*} forEachContext Context for forEachContext. |
| 19186 | */ |
| 19187 | function forEachChildren(children, forEachFunc, forEachContext) { |
| 19188 | if (children == null) { |
| 19189 | return children; |
| 19190 | } |
| 19191 | var traverseContext = getPooledTraverseContext(null, null, forEachFunc, forEachContext); |
| 19192 | traverseAllChildren(children, forEachSingleChild, traverseContext); |
| 19193 | releaseTraverseContext(traverseContext); |
| 19194 | } |
| 19195 | |
| 19196 | function mapSingleChildIntoContext(bookKeeping, child, childKey) { |
| 19197 | var result = bookKeeping.result, |
nothing calls this directly
no test coverage detected