← React Intermediate Questions - Set 10 Q91

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

React Intermediate Questions - Set 10

Example

useMemo(() => items.filter(f), [items, f]);   // value
useCallback(() => onPick(id), [id]);          // function

What to notice

← Back to the question list