Duplicates
Latest version
Current behavior 😯
The current behavior when using Suspense in ssr in 0.7.6 is that it renders the content in a <template/>
Let's look at this example I provided: https://codesandbox.io/p/github/BierDav/solid-start-ssr-bug/master
When we look at the working example at the network tab and preview the initial html provided we see everything looks fine:

The list is rendered and the style is applied
But on the not-working page, which uses a createResource, everything in the suspense is seamingly missing:

If we look closely than we see that the content of the Suspense can be found in the initial html, but it is contained in a template which makes it invisible in the preview and also in the initial view the user gets:

This is a different behaviour than in 0.3.10 from which I recently upgraded. Because in this version the result of Suspense is directly rendered in the body and this is what I expect because doing it the new way has two major disadvatages:
- The user again has to wait till the javascript kicks in, which kills all the advantage of ssr
- There are issues with methods like
useAssets which makes libraries that heavily rely on this as for example suid unusable
Note:
I can be that the issue with useAssets in a <For/> is unrelated, but I was not sure and didn't want to make a second example. As you can see in the example, all the coffee entries are full width, because the css applied using useAssets which should make them 200px wide doesn't work in a <For/>
Expected behavior 🤔
I want that ssr works again as it already was, that it renders directly into the body and that useAssets does work even when used in a <For/>
Steps to reproduce 🕹
No response
Context 🔦
I want to point out that everything worked fine in 0.3.10, but they broke in the recent versions. I would really love a quick fix for that, because I have already ploughed up our whole codebase.
Your environment 🌎
No response
Duplicates
Latest version
Current behavior 😯
The current behavior when using Suspense in ssr in
0.7.6is that it renders the content in a<template/>Let's look at this example I provided: https://codesandbox.io/p/github/BierDav/solid-start-ssr-bug/master
When we look at the working example at the network tab and preview the initial html provided we see everything looks fine:

The list is rendered and the style is applied
But on the

not-workingpage, which uses acreateResource, everything in the suspense is seamingly missing:If we look closely than we see that the content of the Suspense can be found in the initial html, but it is contained in a template which makes it invisible in the preview and also in the initial view the user gets:

This is a different behaviour than in
0.3.10from which I recently upgraded. Because in this version the result of Suspense is directly rendered in the body and this is what I expect because doing it the new way has two major disadvatages:useAssetswhich makes libraries that heavily rely on this as for examplesuidunusableNote:
I can be that the issue with
useAssetsin a<For/>is unrelated, but I was not sure and didn't want to make a second example. As you can see in the example, all the coffee entries are full width, because the css applied usinguseAssetswhich should make them 200px wide doesn't work in a<For/>Expected behavior 🤔
I want that ssr works again as it already was, that it renders directly into the body and that
useAssetsdoes work even when used in a<For/>Steps to reproduce 🕹
No response
Context 🔦
I want to point out that everything worked fine in
0.3.10, but they broke in the recent versions. I would really love a quick fix for that, because I have already ploughed up our whole codebase.Your environment 🌎
No response