Skip to content

Commit d4e58aa

Browse files
chentsulinljharb
authored andcommitted
[Docs] hook-use-state: fix an undefined variable
1 parent b9292b4 commit d4e58aa

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

CHANGELOG.md

+2
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@ This change log adheres to standards from [Keep a CHANGELOG](https://keepachange
3535
* [Docs] [`jsx-key`]: fix correct example ([#3656][] @developer-bandi)
3636
* [Tests] `jsx-wrap-multilines`: passing tests ([#3545][] @burtek)
3737
* [Docs] [`iframe-missing-sandbox`]: fix link to iframe attribute on mdn ([#3690][] @nnmrts)
38+
* [Docs] [`hook-use-state`]: fix an undefined variable ([#3626][] @chentsulin)
3839

3940
[#3690]: https://github.com/jsx-eslint/eslint-plugin-react/pull/3690
4041
[#3680]: https://github.com/jsx-eslint/eslint-plugin-react/pull/3680
@@ -54,6 +55,7 @@ This change log adheres to standards from [Keep a CHANGELOG](https://keepachange
5455
[#3634]: https://github.com/jsx-eslint/eslint-plugin-react/pull/3634
5556
[#3633]: https://github.com/jsx-eslint/eslint-plugin-react/issues/3633
5657
[#3630]: https://github.com/jsx-eslint/eslint-plugin-react/pull/3630
58+
[#3626]: https://github.com/jsx-eslint/eslint-plugin-react/pull/3626
5759
[#3623]: https://github.com/jsx-eslint/eslint-plugin-react/pull/3623
5860
[#3615]: https://github.com/jsx-eslint/eslint-plugin-react/pull/3615
5961
[#3545]: https://github.com/jsx-eslint/eslint-plugin-react/issues/3545

docs/rules/hook-use-state.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ export default function useColor() {
2727
// useState call is destructured into value + setter pair, but identifier
2828
// names do not follow the [thing, setThing] naming convention
2929
const [color, updateColor] = React.useState();
30-
return useStateResult;
30+
return [color, updateColor];
3131
}
3232
```
3333

0 commit comments

Comments
 (0)