TanStackT
TanStack10mo ago
22 replies
endless-jade

Document Meta for Streaming SSR

Hey friends! I have a page where I’m returning a promise from the loader and handle it with <Await>, but that page’s meta depends on the promise data. I can’t use the promise in the “head” property of the route because it can’t be async. The Document Head Management page for Start tells me that it should be rendered in the <head> which is in the __root, but is it safe to be used in a page inside the <Await> component? Or just in general, is there a proper way to handle the document meta when returning promises?
Document head management is the process of managing the head, title, meta, link, and script tags of a document and TanStack Router provides a robust way to manage the document head for full-stack appl...
Document Head Management | TanStack Router React Docs
Was this page helpful?