File tree Expand file tree Collapse file tree 1 file changed +11
-1
lines changed Expand file tree Collapse file tree 1 file changed +11
-1
lines changed Original file line number Diff line number Diff line change @@ -5,13 +5,17 @@ array literal or an arrow function expression.
5
5
6
6
## Rule Details
7
7
8
- Three different examples of ** incorrect** code for this rule:
8
+ 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