-
Notifications
You must be signed in to change notification settings - Fork 47.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
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 #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 #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
- Loading branch information
Showing
6 changed files
with
48 additions
and
24 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters