qwik icon indicating copy to clipboard operation
qwik copied to clipboard

resource.state is stuck to pending after ssr

Open gdorsi opened this issue 3 years ago • 3 comments

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

gdorsi avatar Oct 15 '22 09:10 gdorsi

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...

manucorporat avatar Oct 16 '22 08:10 manucorporat

https://github.com/BuilderIO/qwik/pull/1747

manucorporat avatar Oct 16 '22 08:10 manucorporat

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!

manucorporat avatar Nov 02 '22 11:11 manucorporat