Would you consider making `<Meta />` optional?
The reason for this ask is that while I understand that you're providing a nice experience for Tanstack/start, it might not be the only way people will use tanstack/router. In my case I am doing server rendering, but I am using tanstack/router to render only the content of body.
You might argue that if I want to do things this custom... then I am on my own and it would be fair enough!
I found myself in this situation because I noticed the exception for missing
__TSR__
and this is how I figured out what's going on.
I am solving my issue now, but extracting this script out of <Meta />
and pasting it into my index.html
file.4 Replies
stormy-goldOP•15mo ago
I see also that
<DehydrateRouter />
is returning null
... I wish I could still use itmetropolitan-bronze•14mo ago
You don’t need dehydrate router any more.
The matches dehydrate themselves now
stormy-goldOP•14mo ago
Sharing my perspective in case it's useful.
I am trying to keep up with everything coming up with tanstack/start, thanks for the great work!
The reason why I can't use the
<Meta />
component as it is, is that:
* I am not using tanstack/start
* I am still relying on index.html
picked up by Vite
* in __root.tsx
I am rendering just the body
Why am I not sticking to tanstack/start instructions:
* I might to in other projects, but here I intend to have it running with my existing API backend built with Fastify
* I rely on referencing assets in index.html
that get path rewritten during Vite build... I am doing also a PWA
* I am using react-helmet-async
to have a single pattern for updating meta tags for both server and client. I need to check if I can do the same with tanstack/start, but probably I have to give up rendering just the body content
I solved the situation by the way, by manually copy pasting the logic around the __TSR__
object... even though I am aware that it isn't a great way to do it!
https://github.com/giacomorebonato/abc-music/blob/main/index.html#L6-L30metropolitan-bronze•14mo ago
If it works it works!