Browse Source

Update hooks-overview.md (#1308)

main
Stephen Burke 6 years ago
committed by Alex Krolick
parent
commit
ce2729582c
  1. 2
      content/docs/hooks-overview.md

2
content/docs/hooks-overview.md

@ -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?

Loading…
Cancel
Save