mirror of
https://github.com/kou029w/_.git
synced 2025-01-31 14:28:04 +00:00
10 lines
347 B
TypeScript
10 lines
347 B
TypeScript
import { hydrate as reactHydrate } from "preact";
|
|
import { getPage } from "vite-plugin-ssr/client";
|
|
import type { PageContextBuiltInClient } from "vite-plugin-ssr/types";
|
|
|
|
export async function hydrate() {
|
|
const pageContext = await getPage<PageContextBuiltInClient>();
|
|
const { Page } = pageContext;
|
|
|
|
reactHydrate(<Page />, document.body);
|
|
}
|