The React useMemo Hook returns a memoized value. Memoization is like caching a value so that react does not have to calculate it every time it re-renders.The useMemo Hook only runs when one of its dependencies update.
This gives performance benefits to the developer as well as the user.
In this video I have shown how to use memo hook and to keep it from re-computing the return value of some complex function.
Link to useCallback video: https://www.youtube.com/watch?v=Rt3gMSnnSac