Skip to content

Commit

Permalink
[Docs] jsx-key: fix correct example
Browse files Browse the repository at this point in the history
  • Loading branch information
developer-bandi authored and ljharb committed Nov 20, 2023
1 parent 3fb79e1 commit 48318fa
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,9 @@ This change log adheres to standards from [Keep a CHANGELOG](https://keepachange
* [Refactor] [`boolean-prop-naming`]: invert if statement ([#3634][] @HenryBrown0)
* [Refactor] [`function-component-definition`]: exit early if no type params ([#3634][] @HenryBrown0)
* [Refactor] [`jsx-props-no-multi-spaces`]: extract type parameters to var ([#3634][] @HenryBrown0)
* [Docs] [`jsx-key`]: fix correct example ([#3656][] @developer-bandi)

[#3656]: https://github.com/jsx-eslint/eslint-plugin-react/pull/3656
[#3654]: https://github.com/jsx-eslint/eslint-plugin-react/pull/3654
[#3652]: https://github.com/jsx-eslint/eslint-plugin-react/pull/3652
[#3645]: https://github.com/jsx-eslint/eslint-plugin-react/pull/3645
Expand Down
2 changes: 1 addition & 1 deletion docs/rules/jsx-key.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ data.map((x) => <Hello key={x.id}>{x}</Hello>);
```

```jsx
Array.from([1, 2, 3], (x) => <Hello key={x.id}>{x}</Hello>);
Array.from([1, 2, 3], (x) => <Hello key={x}>{x}</Hello>);
```

```jsx
Expand Down

0 comments on commit 48318fa

Please sign in to comment.