You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
However, React's docs on rules for hooks state to avoid using them unless they are in the root of your function component, that is, not in nested functions. Are we sure useMemo is safe to use in this way?
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
Hi all,
The FAQ on
useControlledState
recommends that it should be used along with useMemo, e.g.However, React's docs on rules for hooks state to avoid using them unless they are in the root of your function component, that is, not in nested functions. Are we sure
useMemo
is safe to use in this way?Beta Was this translation helpful? Give feedback.
All reactions