Is <HydrationScript/> required even if I'm not utilizing SolidJS' SSR?

In my project, the Uncaught ReferenceError: _$HY is not defined is shown when I'm not using <HydrationScript/>, but looking through the Discord server messages, I get the feeling that <HydrationScript/> is only used if I plan to have SSR, which I don't since my project's tech stack is Astro + SolidJS. I also don't recall <HydrationScript/> being mentioned in the tutorial of the new docs website, and the documention for <HydrationScript/> doesn't say if this is required in every project or only for projects that use SSR. My project still runs as expected with or without <HydrationScript/>, but it'll be nice if the confusion on the usage of <HydrationScript/> gets cleared up. Thanks in advance.
4 Replies
bigmistqke
bigmistqke17mo ago
if u use astro chances r pretty big ur doing ssr no?
bigmistqke
bigmistqke17mo ago
GitHub
_$HY is not defined for Solidjs component which uses createResource...
What version of astro are you using? 2.6.1 Are you using an SSR adapter? If so, which one? Cloudflare What package manager are you using? pnpm What operating system are you using? Mac What browser ...
appleandroid
appleandroidOP17mo ago
As of now, I'm only deploying to GitHub Pages, so I'm pretty sure there's no SSR, but it's good to know that this is a known issue/bug at Astro's side Thank you for your help
bigmistqke
bigmistqke17mo ago
mm ye never really worked with statically rendered pages myself tbh. But I think they actually hydrate just like ssr-renderered pages. when u think of it, statically rendered pages are server-side rendered pages. they r just not done on-demand.
Want results from more Discord servers?
Add your server