A

Admin • 833K Points
Coach

Q. What does `useCallback` hook do?

  • (A) It returns a new function every time
  • (B) It memoizes a function to avoid unnecessary re-creation
  • (C) It creates a new state
  • (D) It modifies context
  • Correct Answer - Option(B)
  • Views: 27
  • Filed under category React JS
  • Hashtags:

Explanation by: Admin

useCallback returns a memoized version of a callback that only changes if dependencies change.

You must be Logged in to update hint/solution

Discusssion

Login to discuss.

Be the first to start discuss.