Skip to content

[🐞] Using “routeLoader$” inside a “hook” breaks re-rendering. #7969

@devcaeg

Description

@devcaeg

Which component is affected?

Qwik Runtime

Describe the bug

If “routerLoader$” is used within a hook, and there is a state change that causes a re-render, this re-render is not completed, meaning the UI does not change.

Reproduction

https://stackblitz.com/edit/github-5yxcyvac-zns8txcs?file=src%2Froutes%2Findex.tsx

Steps to reproduce

  • Enter 3 in the input field. You will see that although the list refreshes in the console, it does not refresh in the UI.
  • Comment out line 50, repeat step 1, and see that it now works.

System Info

System:
  OS: macOS 26.0
  CPU: (8) arm64 Apple M2
  Memory: 251.47 MB / 16.00 GB
  Shell: 5.9 - /bin/zsh
Binaries:
  Node: 22.18.0 - ~/.nvm/versions/node/v22.18.0/bin/node
  npm: 10.9.3 - ~/.nvm/versions/node/v22.18.0/bin/npm
  pnpm: 10.16.1 - /opt/homebrew/bin/pnpm
  bun: 1.2.22 - /opt/homebrew/bin/bun
Browsers:
  Chrome: 140.0.7339.134
  Edge: 140.0.3485.66
  Safari: 26.0
npmPackages:
  @qwik.dev/core: https://pkg.pr.new/QwikDev/qwik/@qwik.dev/core@11bcf73 => 2.0.0-beta.10 
  @qwik.dev/router: https://pkg.pr.new/QwikDev/qwik/@qwik.dev/router@11bcf73 => 2.0.0-beta.10 
  typescript: 5.9.2 => 5.9.2 
  vite: 7.1.5 => 7.1.5

Additional Information

No response

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions