Question 4 of 10Pro Only

What is the difference between useMemo and useCallback? Why is referential stability important for React performance?

Sample answer preview

useMemo and useCallback are both memoization hooks, but they memoize different things. useMemo memoizes a calculated value. useCallback memoizes a function itself. The fundamental difference is as follows.

useCallbackuseMemoreferential equalityReact.memomemoizationperformance

Unlock the full answer

Get the complete model answer, key points, common pitfalls, and access to 9+ more Frontend Developer interview questions.

Upgrade to Pro

Starting at $19/month • Cancel anytime