-
Notifications
You must be signed in to change notification settings - Fork 1.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[🐞] Elements processed out of order with no SSR #3966
Comments
|
Related to #4757 |
Here's a playground demonstrating the issue. Interestingly, the second time you render on the client it does do it in order. However, I don't think this will get fixed. There's no guarantees on rendering order, and implementing such guarantees takes effort, continued maintenance, and might impact performance. @mhevery what's your take on this? |
This has to do in dev mode we lazy load code, which means there is a promise that causes a delay in rendering. I don't think this is something we can fix without a perf penalty, so I would say it works as intended. I am tempted to close issue as working as intended. WDYT? |
The workaround for this problem is to use "inline components" that allow you to track the right order This is what we did in Qwik UI Closing as working as intended for now |
we need docs on this |
Thanks @PatrickJS ! good suggestion! Let's open a new issue about it and reference this issue so we won't forget. |
Which component is affected?
Qwik Runtime
Describe the bug
When I run
pnpm vite
and view the page as defined below I see2, 3, 1
printed to the browser console. However when I runpnpm vite --mode ssr
and view the page I see1, 2, 3
printed to the server console.If you add additional children it just trickles down, the FIRST is always executed LAST in non-ssr. In the DOM it appears in the correct order in both scenerios. This makes component testing challenging when you are expecting a precise ordering.
Reproduction
https://stackblitz.com/edit/qwik-starter-tvnpeu?file=src/root.tsx
Steps to reproduce
npm run start-nossr
System Info
Additional Information
No response
The text was updated successfully, but these errors were encountered: