File tree 2 files changed +12
-0
lines changed
2 files changed +12
-0
lines changed Original file line number Diff line number Diff line change @@ -10,8 +10,10 @@ This change log adheres to standards from [Keep a CHANGELOG](https://keepachange
10
10
11
11
### Changed
12
12
* [ Docs] [ ` jsx-tag-spacing ` ] : rename option from [ #3264 ] [ ] ([ #3294 [ ] @ljharb )
13
+ * [ Docs] [ ` jsx-key ` ] : split the examples ([ #3293 ] [ ] @ioggstream )
13
14
14
15
[ #3294 ] : https://github.com/jsx-eslint/eslint-plugin-react/issues/3294
16
+ [ #3293 ] : https://github.com/jsx-eslint/eslint-plugin-react/pull/3293
15
17
[ #3291 ] : https://github.com/jsx-eslint/eslint-plugin-react/pull/3291
16
18
17
19
## [ 7.30.0] - 2022.05.18
Original file line number Diff line number Diff line change @@ -9,9 +9,13 @@ Examples of **incorrect** code for this rule:
9
9
10
10
``` jsx
11
11
[< Hello / > , < Hello / > , < Hello / > ];
12
+ ```
12
13
14
+ ``` jsx
13
15
data .map (x => < Hello> {x}< / Hello> );
16
+ ```
14
17
18
+ ``` jsx
15
19
< Hello {... { key: id, id, caption }} / >
16
20
```
17
21
@@ -21,9 +25,13 @@ Examples of **correct** code for this rule:
21
25
22
26
``` jsx
23
27
[< Hello key= " first" / > , < Hello key= " second" / > , < Hello key= " third" / > ];
28
+ ```
24
29
30
+ ``` jsx
25
31
data .map ((x ) => < Hello key= {x .id }> {x}< / Hello> );
32
+ ```
26
33
34
+ ``` jsx
27
35
< Hello key= {id} {... { id, caption }} / >
28
36
```
29
37
@@ -43,7 +51,9 @@ Examples of **incorrect** code for this rule:
43
51
44
52
``` jsx
45
53
[<>< / > , <>< / > , <>< / > ];
54
+ ```
46
55
56
+ ``` jsx
47
57
data .map (x => <> {x}< / > );
48
58
```
49
59
You can’t perform that action at this time.
0 commit comments