React.memo explained: When to use it (and when not to) - LogRocket Blog
Briefly

React.memo is a higher-order component in React that caches functional components, preventing re-renders unless the props change. This optimization helps tackle performance issues, especially with frequently rendering components that have expensive render operations or infrequently changing props. However, caution is advised since overusing React.memo can introduce complexity. Additionally, components may still re-render if their props reference changes or if they depend on frequently updating state or contexts, thus requiring developers to understand its proper application to effectively leverage its benefits.
React.memo is a performance optimization that prevents unnecessary re-renders of functional components unless their props change, making it ideal for components with frequent re-renders.
Despite the efficiency of React.memo, a component may still re-render if its props change reference or if it relies on frequently updating context or state.
Read at LogRocket Blog
[
|
]