Skip to content

Commit 5d2a4e3

Browse files
authored
[beta] Push people away more from setting state in render (#4299)
* [beta] Push people away more from setting state in render * Backticks
1 parent 6ebae12 commit 5d2a4e3

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

beta/src/pages/apis/usestate.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -790,7 +790,7 @@ Usually, you will update state in event handlers. However, **in rare cases you m
790790
791791
In most cases you don't need derived state:
792792
793-
* If you want to always copy a prop into state, [remove that redundant state altogether.](/learn/choosing-the-state-structure#avoid-redundant-state)
793+
* **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](/apis/usememo) can help.
794794
* If you want to reset the entire component tree's state, [pass a different `key` to your component.](#resetting-state-with-a-key)
795795
* If you can, update all the relevant state in the event handlers.
796796

0 commit comments

Comments
 (0)