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 2 years ago

Answers (1)

Add Answer
Umang Ramani Marked As Accepted
Staff answered 2 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