qwik
qwik copied to clipboard
Navigation broken after page reload
trafficstars
Qwik Version
0.9.0
Operating System (or Browser)
Windows/Chrome 104 & FF 104
Node Version (if applicable)
18
Which component is affected?
Qwik City
Expected Behaviour
- Start a new project with
npm create qwik@latest - Begin dev server with
npm run dev - Click link to
/flower - Navigate forward/back with browser buttons successfully
- Reload page
- Attempt to navigate with browser buttons
- Expect they continue to work after reload
Actual Behaviour
- After page reload, navigation fails. The URL is updated but the page is not navigated to. The link is using a
<Link>component from qwik-city.
Additional Information
No response
I investigated this issue. It seems that this is related to https://github.com/BuilderIO/qwik/issues/1413.
The problem is that there is no event listener "popstate" after refresh, because useWatch is not called.
Closed with https://github.com/BuilderIO/qwik/pull/2263