Skip to content

Commit

Permalink
Update hook-use-state.md
Browse files Browse the repository at this point in the history
Fix an undefined variable.
  • Loading branch information
chentsulin authored Aug 28, 2023
1 parent 422ff33 commit faf5744
Showing 1 changed file with 1 addition and 1 deletion.
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 faf5744

Please sign in to comment.