Update inaccurate mapChildren comment (#18931)

The function you provide will only be passed a child and an index. It will not be passed a key. This is confirmed in the source, the Flow types, and the jsdoc comments.
This commit is contained in:
Ricky Vetter
2020-05-15 13:05:08 -04:00
committed by GitHub
parent 21dc41c320
commit 121af3143c

View File

@@ -212,7 +212,7 @@ type MapFunc = (child: ?React$Node) => ?ReactNodeList;
*
* See https://reactjs.org/docs/react-api.html#reactchildrenmap
*
* The provided mapFunction(child, key, index) will be called for each
* The provided mapFunction(child, index) will be called for each
* leaf child.
*
* @param {?*} children Children tree container.