From faf5744f97552fcbf5aeb2121f01264553d77988 Mon Sep 17 00:00:00 2001 From: "C. T. Lin" Date: Mon, 28 Aug 2023 15:33:35 +0800 Subject: [PATCH] Update hook-use-state.md Fix an undefined variable. --- docs/rules/hook-use-state.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/rules/hook-use-state.md b/docs/rules/hook-use-state.md index 838d86b607..9654f270fb 100644 --- a/docs/rules/hook-use-state.md +++ b/docs/rules/hook-use-state.md @@ -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]; } ```