What is difference between usememo and usecallback hooks in react js?

Forums ReactWhat is difference between usememo and usecallback hooks in react js?
Staff asked 3 years ago

Answers (1)

Add Answer
Umang Ramani Marked As Accepted
Staff answered 3 years ago

The UseCallback function is used to improve the rendering behavior of your React function components.

useMemo is used to cache costly functions so that they do not have to be called on every render.

Subscribe

Select Categories