Disallow missing key
prop in JSX elements that likely require a key
prop (react/jsx-key)
#1369
Labels
Milestone
https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/jsx-key.md
This rule caught a ton of instances where I forgot
key
in bitmidi.com, where I use Preact and the development tools don't seem to warn about this.Warn if an element that likely requires a
key
prop--namely, one present in anarray literal or an arrow function expression.
Rule Details
The following patterns are considered warnings:
In the last example the key is being spread, which is currently possible, but discouraged in favor of the statically provided key.
The following patterns are not considered warnings:
The text was updated successfully, but these errors were encountered: