On every re-render React will re-mount this component (i.e. destroy it and re-create it from scratch), which is going to be much slower than a normal re-render. On top of that, this will lead to such bugs as:
“flashes” of content during re-renders
state being reset in the component with every re-render
useEffect with no dependencies triggered on every re-render
if a component was focused, focus will be lost
avoid-creating-components-in-render-function