import ReactDOM from 'react-dom' ; import React from 'react' ; import { getPage } from 'vite-plugin-ssr/client' ; import { PageShell } from './PageShell' ; import type { PageContext } from './types' ; import type { PageContextBuiltInClient } from 'vite-plugin-ssr/client' ; hydrate ( ) ; async function hydrate ( ) { const pageContext = await getPage < PageContextBuiltInClient & PageContext > ( ) ; const { Page , pageProps } = pageContext ; ReactDOM . hydrate ( < PageShell pageContext = { pageContext } > < Page { ... pageProps } / > < /PageShell>, document.getElementById('page-view')); }