Update hooks-reference.md (#2691)

Clarifying  a useState sentence
This commit is contained in:
Aviv Hadar
2020-03-09 13:08:46 +01:00
committed by GitHub
parent 902918e162
commit 602bfb5eda

View File

@@ -69,7 +69,7 @@ function Counter({initialCount}) {
The "+" and "-" buttons use the functional form, because the updated value is based on the previous value. But the "Reset" button uses the normal form, because it always sets the count back to the initial value.
If your update function returns the exact same value, the subsequent rerender will be skipped completely.
If your update function returns the exact same value as the current state, the subsequent rerender will be skipped completely.
> Note
>