import { StrictMode } from "react"; import { createRoot } from "react-dom/client"; import { App } from "./App"; import { dispatch } from "./store"; // Imported for its side effect: stamps the remembered theme on // before the first render, so the page does not flash the default palette. import "./theme"; import { connectSocket, wsUrl } from "./ws"; import "./app.css"; const root = document.getElementById("root"); if (!root) { throw new Error("index.html must contain a #root element"); } const socket = connectSocket({ url: wsUrl(), dispatch }); createRoot(root).render( , );