cf.completefrontend

Predict the outputMedium

What does this Effect log when the component mounts in Strict Mode?

What does it log, and what does the page show?
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…