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
bigmistqke10mo ago
if u use astro chances r pretty big ur doing ssr no?
bigmistqke
bigmistqke10mo 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
appleandroid10mo 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
bigmistqke10mo 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
More Posts
Building with SSR false starts (and doesn't close) listenersIn my app I create a WebsocketServer on Port 3001. If I run `npm run build` with default SSR settingSolidJS: Manually using SSR with v8?Hi, I am working on a project which has a PHP back-end, but which has access to a PHP V8 (https://gHow to save canvas state to backend and load it later?How can I load the state and save it to the backend later?Is this really the most ergonomic way to preserve searchParams with <A>?I've got what I imagine is a pretty common pattern: displaying a list of entities on the left, each How to instruct a component to reset a state it holds?I have a form looking like this (simplified code): ```jsx <Form> <TextField value={store.foo} /> reactiveMap does not work with size/deleteI have noticed that `reactiveMap` does not trigger update on `delete` or when we "subscribe" using `[SPA Routing]: How to not call data function for the protected routesLet's imagine we have the following app ```tsx const App = () => ( <AuthService> <Router> Why is this store still reactive?https://playground.solidjs.com/anonymous/5b3ceb29-ea8d-493d-a2fb-fd464b28ae2b I create a store in aBundling Component SSR Compatible library - sharedConfig is undefinedHello, I'm trying to create a SolidJS Component library which will be imported into an Astro projecIs it possible to create a resource of type HTMLImageElement with SSR?Is it possible to create a resource of type HTMLImageElement with SSR? The server would have to rend