GodBleak
What am I missing for HMR, here?
Sorry, I must've missed the notification for this.
It seems it was a hydration issue (or rather, a lack of understanding, on my part, when it comes to hydration). Initially I had a component that had the
head
, and the body
tags which had the noscript
tag and the children -- which would be the app itself. I'd use it like this:
However, when making changes to the app content, HMR would break, likely because it was updating the entire document; due to them being in the same module.
I started to clue into this, so I moved the most of everything that was in the Document
component to just be static HTML streamed by the server, and just have Solid render App
:
However, unbeknownst to me, this caused an entirely different problem; this likely broke hydration. However, thinking it was the same issue, that's when I created this thread.
So the solution was to get rid of that static html, and go back to the original Document
component, but instead of wrapping the app content with it, wrap the App
component with with it, in a different module. So I did that in the renderToStream
and hydrate
functions, as they're each in their own module:
7 replies
What am I missing for HMR, here?
Looks like I got it figured it out: https://stackblitz.com/edit/stackblitz-starters-i1dhxl
7 replies