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 |
2 replies
|
Couldn't you just use a source signal with an |
3 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
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
undefinedwhenisServeristrue, and callingrefetchinonMount. However it requires much more code to handle theundefinedvalues.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)?All reactions