MCPcopy Create free account
hub / github.com/Lucifier129/react-lite / mapChildren

Function mapChildren

examples/simple/react.js:4313–4320  ·  view source on GitHub ↗

* Maps children that are typically specified as `props.children`. * * The provided mapFunction(child, key, index) will be called for each * leaf child. * * @param {?*} children Children tree container. * @param {function(*, int)} func The map function. * @param {*} context Context for mapFunc

(children, func, context)

Source from the content-addressed store, hash-verified

4311 * @return {object} Object containing the ordered map of results.
4312 */
4313function mapChildren(children, func, context) {
4314 if (children == null) {
4315 return children;
4316 }
4317 var result = [];
4318 mapIntoWithKeyPrefixInternal(children, result, null, func, context);
4319 return result;
4320}
4321
4322function forEachSingleChildDummy(traverseContext, child, name) {
4323 return null;

Callers

nothing calls this directly

Calls 1

Tested by

no test coverage detected