router
router copied to clipboard
useSearch params become undefined after waiting some time and hovering on a Link component
Describe the bug
Initially the params from the useSearch are correct. However, if we wait around 30s, I notice that hovering over a Link component or an anchor element with props from the useLinkProps() will change the params to undefined. The latter one is harder to reproduce.
Your Example Website or App
https://stackblitz.com/edit/tanstack-router-dmt89j?file=src%2Froutes%2F__root.tsx
Steps to Reproduce the Bug or Issue
- Open up the example
- You should be on
/about?href=something - The console logs out
{ href:something } - Wait 30 seconds
- Hover on the 'About' Link component
- The console logs out
{}instead of{ href:something }
Expected behavior
The query params shouldn't be undefined if they are still in the URL
Screenshots or Videos
https://github.com/TanStack/router/assets/133883077/30448a47-2cc8-41a3-acd5-b11313307fe5
Platform
- OS: Ubuntu 22.04
- Browser: Chrome 120.0.6099.199 (Official Build) (64-bit)
Additional context
@tanstack/react-router": "^1.9.0", @tanstack/router-devtools": "^1.9.0", @tanstack/router-vite-plugin": "^1.8.2"