I am trying out useResource with Resource for the first time with a very simple example to understand mechanics. It works as anciticpated once loaded and reactivated on the client but partially blocks page rendering on initial load.
I say partially: consider the following code. Im using the counter to retrigger useResource to force "Loading" for a short period.
Result: on page reload all rendering is blocked after Resource: until the delay expires. I think it should display "Loading" and continue rendering the remainder of the elements on the page. If it did this it would work like <Suspense> in React. However blocking some of the rendering looks like a bug.
Load the sandbox and inspect the index.tsx file. you can see in the log that the useResource is waiting on the server. I dont think this should block everything after the on the client.
Which component is affected?
Qwik Runtime
Describe the bug
I am trying out useResource with Resource for the first time with a very simple example to understand mechanics. It works as anciticpated once loaded and reactivated on the client but partially blocks page rendering on initial load.
I say partially: consider the following code. Im using the counter to retrigger useResource to force "Loading" for a short period.
Result: on page reload all rendering is blocked after Resource: until the delay expires. I think it should display "Loading" and continue rendering the remainder of the elements on the page. If it did this it would work like
<Suspense>
in React. However blocking some of the rendering looks like a bug.Reproduction
https://codesandbox.io/p/devbox/ecstatic-forest-ymxxv8?file=%2Fsrc%2Froutes%2Findex.tsx%3A18%2C1
Steps to reproduce
Load the sandbox and inspect the index.tsx file. you can see in the log that the useResource is waiting on the server. I dont think this should block everything after the on the client.
System Info
Additional Information
No response