What might cause unnecessary re-renders during the updating phase?
Creating new objects or functions in the render method can cause unnecessary re-renders during the updating phase. When parent components re-render, they pass these newly created objects or functions as props to child components. Since references to these objects/functions change on every render (even if their contents are identical), child components will see them as new props and re-render unnecessarily, unless they're wrapped in React.memo or have shouldComponentUpdate implemented.