Skip to content

Key warnings should show component stack #6790

Closed
@sophiebits

Description

In #6771 I made it so that proptypes warnings show the stack of components where the warning occurred. We should do the same for key warnings (when no key is provided):

Each child in an array or iterator should have a unique "key" prop.

It shouldn't be too hard to use ReactComponentTreeDevtool.getCurrentStackAddendum in the same way that proptypes warnings are now using it and to update the unit tests so that they pass with the new format.

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions