dan 2 years ago
committed by GitHub
parent
commit
09f0da6551
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
  1. 2
      beta/src/content/reference/react/useState.md

2
beta/src/content/reference/react/useState.md

@ -1075,7 +1075,7 @@ Usually, you will update state in event handlers. However, in rare cases you mig
In most cases, you don't need this:
* **If the value you need can be computed entirely from the current props or other state, [remove that redundant state altogether.](/learn/choosing-the-state-structure#avoid-redundant-state)** If you're worried about recomputing too often, the [`useMemo` Hook](/reference/react/usememo) can help.
* **If the value you need can be computed entirely from the current props or other state, [remove that redundant state altogether.](/learn/choosing-the-state-structure#avoid-redundant-state)** If you're worried about recomputing too often, the [`useMemo` Hook](/reference/react/useMemo) can help.
* If you want to reset the entire component tree's state, [pass a different `key` to your component.](#resetting-state-with-a-key)
* If you can, update all the relevant state in the event handlers.

Loading…
Cancel
Save