Replies: 2 comments 5 replies
-
Hmm.. not that I can think of. Suspense expects resolution. So for it to Suspend on the server means it expects the server to resolve at some point. And trying to do something clever with chaining probably won't work because hydration has to match. No it couldn't use the same Suspense mechanism. However there is a solution if you don't want that section to render anyway I'd consider using |
Beta Was this translation helpful? Give feedback.
-
Couldn't you just use a source signal with an |
Beta Was this translation helpful? Give feedback.
-
By using
createResource
, Solid Start will run the fetcher at both server and client side. But sometimes the resource is not available at server side, for example it uses WebUSB or WebHID API to interact with local devices, or it access a resource in the intranet.I can return
undefined
whenisServer
istrue
, and callingrefetch
inonMount
. However it requires much more code to handle theundefined
values.Can I create a resource that, during SSR, is always loading, so
<Suspense>
s will render their fallbacks, and during client-side rendering, it starts fetch immediately (start with loading state)?Beta Was this translation helpful? Give feedback.
All reactions