Difference between useCallback and useMemo Hooks in react

Forums ReactDifference between useCallback and useMemo Hooks in react
Staff asked 2 years ago

Answers (1)

Add Answer
Utsav Vasoya Marked As Accepted
Staff answered 2 years ago

useCallback returns its function when the dependencies change while useMemo calls its function and returns the result.

useMemo will remember the returned value from your function.

useCallback will remember your actual function.

Subscribe

Select Categories