Removal of manual React.memo wrapping #44
Unanswered
ksjogo
asked this question in
General Questions
Replies: 2 comments 8 replies
-
Beta Was this translation helpful? Give feedback.
4 replies
-
At this moment React compiler does not optimize re-renders within functions like |
Beta Was this translation helpful? Give feedback.
4 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi,
#39 and #16 covered a bit of this as considering keeping useCallback/useMemo as is.
But I am wondering about wrapping with memo.
Running the compiler over manually memoized components with exported version wrapping them in memo() will result in these components showing up as "Memo *" "Memo":
As far as I understand the manual memos could be dropped as the compiled version is essentially doing the same already and would return the fully cached version on no prop change?
But for now the compiler is only touching the code within the function component and not potential (export) wrappers?
Might that happen in the future?
Beta Was this translation helpful? Give feedback.
All reactions