← React Intermediate Questions - Set 6 Q54

What is the difference between `useMemo` and `useCallback`?

React Intermediate Questions - Set 6

Example

useMemo(() => compute(a), [a]);          // a value
useCallback(() => compute(a), [a]);      // a function

What to notice

← Back to the question list