Skip to content

Commit

Permalink
[Docs] hook-use-state: fix an undefined variable
Browse files Browse the repository at this point in the history
  • Loading branch information
chentsulin authored and ljharb committed Aug 28, 2023
1 parent b9292b4 commit d4e58aa
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 @@ -35,6 +35,7 @@ This change log adheres to standards from [Keep a CHANGELOG](https://keepachange
* [Docs] [`jsx-key`]: fix correct example ([#3656][] @developer-bandi)
* [Tests] `jsx-wrap-multilines`: passing tests ([#3545][] @burtek)
* [Docs] [`iframe-missing-sandbox`]: fix link to iframe attribute on mdn ([#3690][] @nnmrts)
* [Docs] [`hook-use-state`]: fix an undefined variable ([#3626][] @chentsulin)

[#3690]: https://github.com/jsx-eslint/eslint-plugin-react/pull/3690
[#3680]: https://github.com/jsx-eslint/eslint-plugin-react/pull/3680
Expand All @@ -54,6 +55,7 @@ This change log adheres to standards from [Keep a CHANGELOG](https://keepachange
[#3634]: https://github.com/jsx-eslint/eslint-plugin-react/pull/3634
[#3633]: https://github.com/jsx-eslint/eslint-plugin-react/issues/3633
[#3630]: https://github.com/jsx-eslint/eslint-plugin-react/pull/3630
[#3626]: https://github.com/jsx-eslint/eslint-plugin-react/pull/3626
[#3623]: https://github.com/jsx-eslint/eslint-plugin-react/pull/3623
[#3615]: https://github.com/jsx-eslint/eslint-plugin-react/pull/3615
[#3545]: https://github.com/jsx-eslint/eslint-plugin-react/issues/3545
Expand Down
2 changes: 1 addition & 1 deletion docs/rules/hook-use-state.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ export default function useColor() {
// useState call is destructured into value + setter pair, but identifier
// names do not follow the [thing, setThing] naming convention
const [color, updateColor] = React.useState();
return useStateResult;
return [color, updateColor];
}
```

Expand Down

0 comments on commit d4e58aa

Please sign in to comment.