Browse Source

Corrected misleading wording about React.Children.map

main
Brian Vaughn 6 years ago
parent
commit
9cd3667141
  1. 6
      content/docs/reference-react.md

6
content/docs/reference-react.md

@ -162,7 +162,11 @@ Verifies the object is a React element. Returns `true` or `false`.
React.Children.map(children, function[(thisArg)])
```
Invokes a function on every immediate child contained within `children` with `this` set to `thisArg`. If `children` is a keyed fragment or array it will be traversed: the function will never be passed the container objects. If children is `null` or `undefined`, returns `null` or `undefined` rather than an array.
Invokes a function on every immediate child contained within `children` with `this` set to `thisArg`. If `children` is an array it will be traversed and the function will be called for each child in the array. If children is `null` or `undefined`, this method will return `null` or `undefined` rather than an array.
> Note
>
> If `children` is a `Fragment` it will be treated as a single child and not traversed.
#### `React.Children.forEach`

Loading…
Cancel
Save