You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When true the rule will check if usage of the [shorthand fragment syntax][short_syntax] requires a key. This option was added to avoid a breaking change and will be the default in the next major version.
Examples of incorrect code for this rule:
[<></>,<></>,<></>];data.map(x=><>{x}</>);
The text was updated successfully, but these errors were encountered:
https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/jsx-key.md
Let's enable the new option
checkFragmentShorthand
instandard
:Warn if an element that likely requires a
key
prop--namely, one present in anarray literal or an arrow function expression.
Rule Options
checkFragmentShorthand
(default:false
)When
true
the rule will check if usage of the [shorthand fragment syntax][short_syntax] requires a key. This option was added to avoid a breaking change and will be the default in the next major version.Examples of incorrect code for this rule:
The text was updated successfully, but these errors were encountered: