QuizNot attempted
useMemo vs useCallback return values
1–4 to choose, Enter to submit
Show answer & explanation
Correct answer:
10 vs function
useMemoreturns the result of calling its function (5 * 2 = 10), whileuseCallbackreturns the function itself, sotypeof doubleFnis'function':10 vs function.- Not 'vs number': useCallback never calls the function.
- Not NaN:
countis a number. - Not 'throws': useCallback accepts closures with dependencies
- that is its purpose.