What is the useMemo hook used for?

React Developer Medium

React Developer — Medium

What is the useMemo hook used for?

Key points

  • useMemo is not used to persist mutable values without causing re-renders
  • It is not meant for memoizing callback functions passed to child components
  • It does not cache API responses between component mounts and unmounts

Ready to go further?

Related questions