Q. Which hook is used to memoize a function in React?
β
Correct Answer: (B)
useCallback
Explanation: useCallback returns a memoized version of the callback function that only changes if dependencies change.