* Iterates through children that are typically specified as `props.children`. * * See https://reactjs.org/docs/react-api.html#reactchildrenforeach * * The provided forEachFunc(child, index) will be called for each * leaf child. * * @param {?*} children Children tree container.
(children, forEachFunc, forEachContext)
| 1218 | |
| 1219 | |
| 1220 | function forEachChildren(children, forEachFunc, forEachContext) { |
| 1221 | if (children == null) { |
| 1222 | return children; |
| 1223 | } |
| 1224 | |
| 1225 | var traverseContext = getPooledTraverseContext(null, null, forEachFunc, forEachContext); |
| 1226 | traverseAllChildren(children, forEachSingleChild, traverseContext); |
| 1227 | releaseTraverseContext(traverseContext); |
| 1228 | } |
| 1229 | |
| 1230 | function mapSingleChildIntoContext(bookKeeping, child, childKey) { |
| 1231 | var result = bookKeeping.result, |
nothing calls this directly
no test coverage detected