File tree Expand file tree Collapse file tree 2 files changed +3
-1
lines changed Expand file tree Collapse file tree 2 files changed +3
-1
lines changed Original file line number Diff line number Diff line change @@ -32,7 +32,9 @@ This change log adheres to standards from [Keep a CHANGELOG](https://keepachange
3232* [ Docs] [ ` forbid-foreign-prop-types ` ] : document ` allowInPropTypes ` option ([ #1815 ] [ ] @ljharb )
3333* [ Refactor] [ ` jsx-sort-default-props ` ] : remove unnecessary code ([ #1817 ] [ ] @ljharb )
3434* [ Docs] [ ` jsx-no-target-blank ` ] : fix syntax highlighting ([ #3199 ] [ ] @shamrin )
35+ * [ Docs] [ ` jsx-key ` ] : improve example ([ #3202 ] [ ] @chnakamura )
3536
37+ [ #3202 ] : https://github.com/yannickcr/eslint-plugin-react/pull/3202
3638[ #3199 ] : https://github.com/yannickcr/eslint-plugin-react/pull/3199
3739[ #3198 ] : https://github.com/yannickcr/eslint-plugin-react/pull/3198
3840[ #3195 ] : https://github.com/yannickcr/eslint-plugin-react/pull/3195
Original file line number Diff line number Diff line change @@ -22,7 +22,7 @@ Examples of **correct** code for this rule:
2222``` jsx
2323[< Hello key= " first" / > , < Hello key= " second" / > , < Hello key= " third" / > ];
2424
25- data .map ((x , i ) => < Hello key= {i }> {x}< / Hello> );
25+ data .map ((x ) => < Hello key= {x . id }> {x}< / Hello> );
2626
2727< Hello key= {id} {... { id, caption }} / >
2828```
You can’t perform that action at this time.
0 commit comments