T
TanStackโ€ข11mo ago
national-gold

Start - noscript tags in head

Hey there! I have this setup where I'm conditionally loading styles for users with javascript disabled. It's basically a style tag wrapped with noscript in the head. Will Start support this kind of setup? Loving the project so far ๐Ÿ™‚
GitHub
noscript-stylesheet-uno/app/root.tsx at main ยท carloitaben/noscript...
Contribute to carloitaben/noscript-stylesheet-uno development by creating an account on GitHub.
9 Replies
blank-aquamarine
blank-aquamarineโ€ข9mo ago
i was trying to setup gtm with start and one of the section is putting noscript with iframe. when i tried to put noscript in the render function (not the head of route), it stringify the tag which make it not usable. wondering what's the alternative for this
firm-tan
firm-tanโ€ข2mo ago
Same here, how to implement that noscript tag ?
conscious-sapphire
conscious-sapphireโ€ข2mo ago
can't you just add a noscript tag to head?
firm-tan
firm-tanโ€ข2mo ago
My noscript tag has to be dynamic on some routes, so how to add it via route property?
conscious-sapphire
conscious-sapphireโ€ข2mo ago
can you give more context?
firm-tan
firm-tanโ€ข2mo ago
I fact I have a page for multiple customers. Depending on the customer I fetch its Google Tag Manager ID in the loader. Then I want to add the script + noscript tag via the route properties since my GTM ID is in my loaderData
conscious-sapphire
conscious-sapphireโ€ข2mo ago
sounds like you need to do conditional rendering in the root route then depending on whether the GTM id is present or not
firm-tan
firm-tanโ€ข2mo ago
No plan to add a "noscript" property so? Or PR is welcome?
conscious-sapphire
conscious-sapphireโ€ข2mo ago
hm i dont think we will add noscript handling to head. however i still need to better understand your use case can you share a complete example?

Did you find this page helpful?