Many useCallback and useMemo implementations are pointless because they don't provide actual performance benefits. Memoization only helps when passing props to memoized components or preventing effects from firing unnecessarily. Common anti-patterns include memoizing functions passed to regular components and using non-primitive props as dependencies. The latest ref pattern and upcoming useEffectEvent can solve these issues without requiring extensive memoization chains.
7 Comments
Sort: