Why "hi" is being logged in the console each second twice?
import { useEffect } from "react";
export default function App() {
useEffect(() => {
setInterval(() => console.log("hi"), 1000);
}, []);
return (
<div className="App">
Hello
</div>
);
}