From f681f766983ad2d3604887e50a8f8285449e5b77 Mon Sep 17 00:00:00 2001 From: Pradeep Thakur <43206415+pradeepthakur-lab@users.noreply.github.com> Date: Thu, 6 Apr 2023 18:52:24 +0530 Subject: [PATCH] Clarify a code snippet is incomplete (#5888) * matched the curly braces #issues5887 Added matched the curly braces on the official website tutorial. #issues5887 * Update index.md --------- Co-authored-by: dan --- src/content/learn/index.md | 1 + 1 file changed, 1 insertion(+) diff --git a/src/content/learn/index.md b/src/content/learn/index.md index fa8deddf..b57655bc 100644 --- a/src/content/learn/index.md +++ b/src/content/learn/index.md @@ -313,6 +313,7 @@ Now you can declare a *state variable* inside your component: ```js function MyButton() { const [count, setCount] = useState(0); + // ... ``` You’ll get two things from `useState`: the current state (`count`), and the function that lets you update it (`setCount`). You can give them any names, but the convention is to write `[something, setSomething]`.