Browse Source

Update hooks-reference.md (#2691)

Clarifying  a useState sentence
main
Aviv Hadar 5 years ago
committed by GitHub
parent
commit
602bfb5eda
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
  1. 2
      content/docs/hooks-reference.md

2
content/docs/hooks-reference.md

@ -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. 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 > Note
> >

Loading…
Cancel
Save