Skip to content

Commit f681f76

Browse files
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 <[email protected]>
1 parent d9922db commit f681f76

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

src/content/learn/index.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -313,6 +313,7 @@ Now you can declare a *state variable* inside your component:
313313
```js
314314
function MyButton() {
315315
const [count, setCount] = useState(0);
316+
// ...
316317
```
317318
318319
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]`.

0 commit comments

Comments
 (0)