Skip to content

Commit e0ec287

Browse files
benjaminkincsesDextheking1aurorascharff
authored
Explain that the useState setter triggers a re-render in Quick Start (#8667)
* Explain that the useState setter triggers a re-render in Quick Start * Explain re-render behavior before naming it --------- Co-authored-by: Dextheking1 <Dextheking1@users.noreply.github.com> Co-authored-by: Aurora Scharff <aurora.sofie@gmail.com>
1 parent 4acb201 commit e0ec287

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

‎src/content/learn/index.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -336,7 +336,7 @@ function MyButton() {
336336
}
337337
```
338338
339-
React will call your component function again. This time, `count` will be `1`. Then it will be `2`. And so on.
339+
Calling `setCount` tells React to call your component function again. This is called a *re-render*. This time, `count` will be `1`. Then it will be `2`. And so on.
340340
341341
If you render the same component multiple times, each will get its own state. Click each button separately:
342342

0 commit comments

Comments
 (0)