React - Caching

React - Caching

About

This article is about caching functionalities in React.

There are 2 caching functionalities:

  • for computed values, you would use a memo
  • for a prop function, you would use useCallback. If you pass a function in props to a child component, its reference needs to stay the same. Otherwise, the component is re-render.







Share this page:
Follow us:
Task Runner