mirror of
https://github.com/reactjs/react.dev.git
synced 2026-02-24 20:53:08 +00:00
Update hooks-overview.md (#1308)
This commit is contained in:
committed by
Alex Krolick
parent
81241d1b92
commit
ce2729582c
@@ -58,7 +58,7 @@ function ExampleWithManyStates() {
|
||||
}
|
||||
```
|
||||
|
||||
The [array destructuring](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/Destructuring_assignment#Array_destructuring) syntax let us give different names to the state variables we declared by calling `useState`. These names aren't a part of the `useState` API. Instead, React assumes that if you call `useState` many times, you do it in the same order during every render. We'll come back to why this works and when this is useful later.
|
||||
The [array destructuring](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/Destructuring_assignment#Array_destructuring) syntax lets us give different names to the state variables we declared by calling `useState`. These names aren't a part of the `useState` API. Instead, React assumes that if you call `useState` many times, you do it in the same order during every render. We'll come back to why this works and when this is useful later.
|
||||
|
||||
#### But what is a Hook?
|
||||
|
||||
|
||||
Reference in New Issue
Block a user