Reword duplicate key warning (#10148)
* Reword duplicate key warning
**what is the change?:**
- Removes the now-inaccurate description of behavior around duplicate
keys
- Adds link to 'key' docs page
- Changes tone to be more casual and friendly
Alternative wording idea;
'Encountered two children with the same key, ${key}
Child keys must be unique; using duplicate keys is not supported and
will cause unexpected behavior in some versions of React.
See https://fb.me/react-warning-keys for more information on how to
fix this.'
**why make this change?:**
Mainly this change was needed because in React 16, duplicate keys will
not cause omission of items with duplicate keys. All items will be
rendered. It could happen that in future versions of React we will have
different behavior though.
**test plan:**
`yarn test`
**issue:**
Wishlist item on https://github.com/facebook/react/issues/8854
* Further improve wording of duplicate key error
**what is the change?:**
Another tweak to the wording of this error to make it more clear and
accurate.
**why make this change?:**
The previous tweak was too casual in tone and still not clear enough.
**test plan:**
`yarn test` and `REACT_DOM_JEST_USE_FIBER=1 yarn run test`
**issue:**
Wishlist item on https://github.com/facebook/react/issues/8854
* Run prettier
* Fix typo in error message for duplicate keys
**what is the change?:**
Fixed a typo in the updated message
* Fix two more typo spots F
Flarnie Marchan committed
3b43f3190bbcc5d4cfe77dbc665e03b7b95d35b2
Parent: 50d905b
Committed by GitHub <[email protected]>
on 7/12/2017, 10:49:41 PM