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
32
32
* [ Docs] [ ` forbid-foreign-prop-types ` ] : document ` allowInPropTypes ` option ([ #1815 ] [ ] @ljharb )
33
33
* [ Refactor] [ ` jsx-sort-default-props ` ] : remove unnecessary code ([ #1817 ] [ ] @ljharb )
34
34
* [ Docs] [ ` jsx-no-target-blank ` ] : fix syntax highlighting ([ #3199 ] [ ] @shamrin )
35
+ * [ Docs] [ ` jsx-key ` ] : improve example ([ #3202 ] [ ] @chnakamura )
35
36
37
+ [ #3202 ] : https://github.com/yannickcr/eslint-plugin-react/pull/3202
36
38
[ #3199 ] : https://github.com/yannickcr/eslint-plugin-react/pull/3199
37
39
[ #3198 ] : https://github.com/yannickcr/eslint-plugin-react/pull/3198
38
40
[ #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:
22
22
``` jsx
23
23
[< Hello key= " first" / > , < Hello key= " second" / > , < Hello key= " third" / > ];
24
24
25
- data .map ((x , i ) => < Hello key= {i }> {x}< / Hello> );
25
+ data .map ((x ) => < Hello key= {x . id }> {x}< / Hello> );
26
26
27
27
< Hello key= {id} {... { id, caption }} / >
28
28
```
You can’t perform that action at this time.
0 commit comments