Open lindblom opened 1 month ago
Actually it works for Slot but not when returning something that can't get attributes. For Slot it will render a script element that has the q: prop with the information for qwikloader. You can see this in the HTML tab.
In v2 it behaves the same currently.
I think that indeed, this is a bug. The use of elements to communicate with qwikloader is an implementation detail and shouldn't impact useOnDocument.
@wmertens Can this be fixed? just curious
Which component is affected?
Qwik Runtime
Describe the bug
This component only works if its on the page initially loaded, not if i reach it by SPA routing.
If i were to add a wrappeing div like this it will work as I expect:
I dont know if this is a bug or if its by design, but i suspect its not how its supposed to be. :)
Reproduction
https://stackblitz.com/edit/github-qb52m7?file=src%2Froutes%2Fdemo%2Fflower%2Findex.tsx
Steps to reproduce
It doesnt reproduce on stackblitz, but download the project and start it using npm install && npm run dev.
System Info
Additional Information
No response