shelving
Version:
Toolkit for using data in JavaScript.
13 lines (12 loc) • 696 B
JavaScript
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
import { MetaContext, requireMeta } from "../misc/MetaContext.js";
import { Head } from "./Head.js";
/**
* Component for a single page (or screen) within an app.
* - Sets the document title and other head metadata via `<Head>`, which emits hoistable tags inline; React 19 hoists each one into the document `<head>`. `<base>` is not emitted here — it lives in the `<HTML>` shell's `<Head>`.
* - Also updates `window.history` to match the page URL.
*/
export function Page({ children, ...meta }) {
const merged = requireMeta(meta);
return (_jsxs(MetaContext, { value: merged, children: [_jsx(Head, {}), children] }));
}