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.





Discover More
React - Memo (Cache)

Memoization is a React caching function that caches a computed value. It save the results of computation, and reuse these results if it sees the same inputs later. React memo is the equivalent...



Share this page:
Follow us:
Task Runner