We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 9346eb8 commit f128396Copy full SHA for f128396
docs/rules/jsx-key.md
@@ -11,14 +11,20 @@ The following patterns are considered warnings:
11
[<Hello />, <Hello />, <Hello />];
12
13
data.map(x => <Hello>{x}</Hello>);
14
+
15
+<Hello {...{ key: id, id, caption }} />
16
```
17
18
+In the last example the key is being spread, which is currently possible, but discouraged in favor of the statically provided key.
19
20
The following patterns are **not** considered warnings:
21
22
```jsx
23
[<Hello key="first" />, <Hello key="second" />, <Hello key="third" />];
24
25
data.map((x, i) => <Hello key={i}>{x}</Hello>);
26
27
+<Hello key={id} {...{ id, caption }} />
28
29
30
## When not to use
0 commit comments