Wurfle
Is it possible to create a resource of type HTMLImageElement with SSR?
The image doesn't have to load on the server at all. The behavior I'm looking for is
1. Server renders page
2. Sees image in a resource
3. Renders suspense fallback
4. Client hydrates
5. Sees image in a resource
6. Loads image as an offscreen HTMLImageElement asynchronously
7. Hydates fallback
8. Image finishes loading
9. Resource completes with image element inside
7 replies
How to not render <Portal> if mount is undefined?
document.getElementById
only returns an element at a particular moment in time. You could run getElementById
inside createEffect
and then update a signal with the result:
Its worth noting that if foo gets removed from the DOM for whatever reason, your signal will not be updated of this unless the effect runs again.5 replies
Passing data from route to layout in solid-start
Quick update I tried this out on a component inside of Suspense/ErrorBoundary and still didn't have any luck with js disabled. My concern is users getting the wrong background color before js loads.
11 replies
Passing data from route to layout in solid-start
Ah okay I see why this might not work on
Html
I will try it inside of suspense. It would be great to be able to set a property directly on html though, sort of like how Meta
and Title
add things to the head no matter where they appear in the component tree11 replies
Passing data from route to layout in solid-start
The code is private but here is a reproduction: https://github.com/nonphoto/solid-start-test
11 replies