QwikDev / qwik

Instant-loading web apps, without effort
https://qwik.dev
MIT License
20.76k stars 1.29k forks source link

[🐞] When do client side navigation routeLoader$ works fine but its client side useRouteLoader return undefined #5614

Open Adbib opened 10 months ago

Adbib commented 10 months ago

Which component is affected?

Qwik City (routing)

Describe the bug

Untitled-2023-12-20-1552 I built an app structure like the image at the top, so when I do a hard refresh or use a simple < a> tag in my sidebar, the (useRouteLoader) in the client returns the data fine. but when I use < Link> tag to navigate the routeLoader server side it runs fine but on the client side of it (userouteLoader) it returns undefined

Reproduction

https://github.com/Adbib/mailing/

Steps to reproduce

No response

System Info

System:
    OS: macOS 13.6.1
    CPU: (4) x64 Intel(R) Core(TM) i5-7360U CPU @ 2.30GHz
    Memory: 17.13 MB / 8.00 GB
    Shell: 5.9 - /bin/zsh
  Binaries:
    Node: 20.10.0 - /usr/local/bin/node
    Yarn: 1.22.18 - /usr/local/bin/yarn
    npm: 10.2.3 - /usr/local/bin/npm
    pnpm: 7.0.0 - /usr/local/bin/pnpm
    bun: 1.0.12 - ~/.bun/bin/bun
  Browsers:
    Safari: 17.1.2

Additional Information

No response

notcod commented 10 months ago

Recreate it with error on https://qwik.new

Adbib commented 10 months ago

Recreate it with error on https://qwik.new

you can easily do https://stackblitz.com/github/Adbib/mailing

ps: I use mailgun so you need a apiKey

edit: In Stackblitz when you click on an item from the sidebar the page gets reloaded not navigated as spa