UNPKG

@tanstack/solid-router

Version:

Modern and scalable routing for Solid applications

15 lines 701 B
import { HydrationScript, useHead } from '@solidjs/web'; import { toHeadTags, useTags } from './headContentUtils'; /** * @description The `HeadContent` component registers the current route's meta * tags, links, and scripts with Solid's head registry, which owns emission * into `<head>` (SSR splicing/streaming and client-side patching alike). It * can be rendered anywhere in the tree, though placing it inside the `<head>` * of your document keeps the hydration script in the right place. */ export function HeadContent(props) { const tags = useTags(props.assetCrossOrigin); useHead(() => toHeadTags(tags())); return <HydrationScript />; } //# sourceMappingURL=HeadContent.jsx.map