Answer the question
In order to leave comments, you need to log in
Difference between useCallback and useMemo?
I read the react manual and didn't understand when to use useCallback and useMemo?
Answer the question
In order to leave comments, you need to log in
The call useCallback(fn, deps)
is equivalent
. The difference is in the additional wrapper that you don't have to write when using useCallback if you want to return a memorized callback. useMemo(() => fn, deps)
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question