πŸ“Š React Js
Q. Which hook is used to memoize a function in React?
  • (A) useMemo
  • (B) useCallback
  • (C) useEffect
  • (D) useRef
πŸ’¬ Discuss
βœ… Correct Answer: (B) useCallback

Explanation: useCallback returns a memoized version of the callback function that only changes if dependencies change.

Explanation by: Mr. Dubey
useCallback returns a memoized version of the callback function that only changes if dependencies change.

πŸ’¬ Discussion


πŸ“Š Question Analytics

πŸ‘οΈ
49
Total Visits
πŸ“½οΈ
9 mo ago
Published
πŸŽ–οΈ
Mr. Dubey
Publisher
πŸ“ˆ
88%
Success Rate