What does this Effect log when the component mounts in Strict Mode?
import { useEffect } from "react";
export default function App() {
useEffect(() => {
console.log("connect");
return () => {
console.log("disconnect");
};
}, []);
return <h1>Chat room</h1>;
}
It runs in development, rendered as <StrictMode><App /></StrictMode>.
The answer
Work out every line it logs, in order, and what the page shows at the end. Then check.
Checking your sign-in…