@tanstack/solid-router
Version:
Modern and scalable routing for Solid applications
19 lines (18 loc) • 871 B
JavaScript
const require_headContentUtils = require("./headContentUtils.cjs");
let _solidjs_web = require("@solidjs/web");
//#region src/HeadContent.tsx
/**
* @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.
*/
function HeadContent(props) {
const tags = require_headContentUtils.useTags(props.assetCrossOrigin);
(0, _solidjs_web.useHead)(() => require_headContentUtils.toHeadTags(tags()));
return (0, _solidjs_web.createComponent)(_solidjs_web.HydrationScript, {});
}
//#endregion
exports.HeadContent = HeadContent;
//# sourceMappingURL=HeadContent.cjs.map