react-server675fbba4
react-servertreemainexamplesreact-routersrcindex.jsx
examples/react-router/src/index.jsxjsx632 Bc0f12486
import "./index.css";

import { ClientOnly } from "@lazarv/react-server/client";

import App from "./App";

// html layout generated by the server with the client-side App mounted
export default function Html() {
  return (
    <html lang="en" suppressHydrationWarning>
      <head>
        <title>@lazarv/react-server</title>
      </head>
      <body suppressHydrationWarning>
        <div id="root">
          {/* we need to wrap the App component in ClientOnly to prevent it from being rendered on the server */}
          <ClientOnly>
            <App />
          </ClientOnly>
        </div>
      </body>
    </html>
  );
}