MCPcopy Create free account
hub / github.com/krasimir/react-in-patterns / mapChildren

Function mapChildren

code/styling/public/app.js:19240–19247  ·  view source on GitHub ↗

* Maps children that are typically specified as `props.children`. * * See https://reactjs.org/docs/react-api.html#react.children.map * * The provided mapFunction(child, key, index) will be called for each * leaf child. * * @param {?*} children Children tree container. * @param {function(*, i

(children, func, context)

Source from the content-addressed store, hash-verified

19238 * @return {object} Object containing the ordered map of results.
19239 */
19240function mapChildren(children, func, context) {
19241 if (children == null) {
19242 return children;
19243 }
19244 var result = [];
19245 mapIntoWithKeyPrefixInternal(children, result, null, func, context);
19246 return result;
19247}
19248
19249/**
19250 * Count the number of children that are typically specified as

Callers

nothing calls this directly

Calls 1

Tested by

no test coverage detected