qwik
qwik copied to clipboard
resource.state is stuck to pending after ssr
Qwik Version
0.11.0
Operating System (or Browser)
Chorme 105
Node Version (if applicable)
No response
Which component is affected?
Qwik City
Expected Behaviour
resource.state should be resolved on page load
Actual Behaviour
resource.state is pending and never switches to resolved
Additional Information
I've created a repro here --> https://stackblitz.com/edit/qwik-starter-hc531u-dv4cjw?file=src%2Froutes%2Findex.tsx%3AL41
This is a very tricky issue to solve... because it would require to rerender, but i can see how it's very counter intuitive and feels wrong...
https://github.com/BuilderIO/qwik/pull/1747
This should be fixed in the latest release! as we removed state from the public api, now developers should rely on:
resource.loading
which will correct work in SSR!