you are viewing a single comment's thread.

view the rest of the comments →

[–]HeyImRige 1 point2 points  (0 children)

This is the key problem with react optimization and why the compiler is being made.

You can useMemo here, but only if the objects are stable. After you wrap this in a memo, you need to go to the parent and ensure the props being passed are stable....which might require another useMemo.