I created this minimal React snippet and when reloading it, I get:
I'm not even using props, state or any other hooks, why would React need to call it twice?
function Component() {
console.log("running Component()", Math.random());
return <>Hello</>;
}
export default function App() {
return (
<div className="App">
<Component />
</div>
);
}