How to Avoid Unnecessary Re-renders in React Without Memoizing Everything
Add a console.log() inside a React component and you may see it run more often than expected. The first reaction is often to add React.memo , useMemo , and useCallback everywhere.