MemotivaPerformance Optimization

What is the difference between useMemo and useCallback?

Performance Optimization

Audio flashcard · 0:13

Nortren·

What is the difference between useMemo and useCallback?

0:13

useMemo memoizes the result of a function call, returning a cached value. useCallback memoizes the function itself, returning the same function reference between renders. useCallback with a function is equivalent to useMemo returning that function.