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
"use no memo" is a temporary escape hatch that lets you opt-out components and hooks from being compiled by the React Compiler. This directive is not meant to be long lived the same way as eg "use client" is.
It should be .. the same way as eg "use memo" i guess. Also, the link goes to use client directive reference page.
@devserkan
I think that's already correct:
beacuse use memo is a React Hook for memoizing values that lets you cache the result of a calculation between re-renders. whereas use client is a React directive that is commonly used or needed only if you’re using React Server Components or building a library compatible with them.
The sentence is comparing the temporary nature of use no memo with something that is intended to be long-lived like "use client".
Thanks! Although I'm quite familiar with useMemo and the differences between hooks and directives, I must have misunderstood something when I created this issue (or maybe I just needed more coffee). ie, they meant to clarify that there is and will not be a permanent directive like use memo. Interestingly, I don't recall why it should link to another thing. Anyway, thanks for your comment!
Summary
The note says:
It should be
.. the same way as eg "use memo"
i guess. Also, the link goes touse client
directive reference page.Page
https://react.dev/learn/react-compiler#use-no-memo
Details
No response
The text was updated successfully, but these errors were encountered: