* 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. * @param {func
( children: ?ReactNodeList, forEachFunc: ForEachFunc, forEachContext: mixed, )
| 404 | * @param {*} forEachContext Context for forEachContext. |
| 405 | */ |
| 406 | function forEachChildren( |
| 407 | children: ?ReactNodeList, |
| 408 | forEachFunc: ForEachFunc, |
| 409 | forEachContext: mixed, |
| 410 | ): void { |
| 411 | mapChildren( |
| 412 | children, |
| 413 | // $FlowFixMe[missing-this-annot] |
| 414 | function () { |
| 415 | forEachFunc.apply(this, arguments); |
| 416 | // Don't return anything. |
| 417 | }, |
| 418 | forEachContext, |
| 419 | ); |
| 420 | } |
| 421 | |
| 422 | /** |
| 423 | * Flatten a children object (typically specified as `props.children`) and |
nothing calls this directly
no test coverage detected