示例工程 20-routing-and-panels
20-routing-and-panels/app/src/main.tsx
import { StrictMode } from "react";
import { createRoot } from "react-dom/client";
import App from "./App";
import "./styles/globals.css";
const root = document.getElementById("root");
if (!root) throw new Error("missing #root");
createRoot(root).render(
<StrictMode>
<App />
</StrictMode>,
);