function App() {
const temp = [];
useEffect(() => {
console.log(temp);
temp.push("new element")
})
return (
<div>
{console.log(temp)}
</div>
);
}
When I run the code in both <React.StrictMode> and non strict mode, i got the following,
I was expecting the first console log in non-strict mode to be an empty array,since useEffect is run after initial render, does non-strict mode skip the initial rendering phase, or is it some other reason that the first console log in non strict mode is not an empty array?

