You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
useMemo calls the function and returns its result/value (if you want to use the result). The value will be cached and recomputed only if the dependencies change.
While useCallback returns the function without calling it (reference equality is important for child rerender; if you want to use function as callback). The function will be cached.
memo vs. PureComponent
memo checks for prop changes for rerender, PureComponent implements shouldComponentUpdate