-
-
Notifications
You must be signed in to change notification settings - Fork 100
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
URL query params are not detected when navigating with the Next Link component #416
Comments
Thanks a lot for the reproduction, I was able to get the same issue on the end-to-end test bench, so I now have a lot of failing tests to fix! See #417 for progress. |
@franky47 I'm curious if this issue is related to this: const [search, setSearch] = useQueryState('query') When I manually set the url to |
@o-az what do you mean by "manually" ? As an update on this issue, Next.js 14.0.3 broke a lot of scripts patching the history APIs (including this library). Turning on the experimental |
@franky47 I edit the url in my browser from |
@o-az Thanks for clarifying. Feel free to open another issue with your exact setup, this will help me understand your issue better and how to address it. |
I have the same issue, how can I fix it? |
The Next.js team just released |
I updated from "next": "^14.0.3" to "next": "^14.0.4-canary.37" and it fixes the issue. |
@franky47 Is there a plan to fix this? I see the PR has not gone through which might mean that you are a bit busy. I am using this in production so thats why its a bit urgent for me. |
Until Next.js 14.0.4 is stable, I don't have a way to fix it internally, the ball is in the Next.js camp. The PR only adds tests to track their progress. Can you try and use 14.0.4-canary.37? |
Next.js 14.0.4 has just been released, and contains the fix for shallow routing which caused this issue. Solutions are to either update to 14.0.4, or if you're stuck on 14.0.3, use the |
🎉 This issue has been resolved in version 1.13.1-beta.1 🎉 The release is available on: Your semantic-release bot 📦🚀 |
🎉 This issue has been resolved in version 1.13.1 🎉 The release is available on: Your semantic-release bot 📦🚀 |
Context
What's your version of
next-usequerystate
?Next.js information (obtained by running
next info
):Are you using:
Description
When I navigate using the Next Link component (and there are query/search params in the href), the
useQueryState
does not detect the param.I have verified by using the
useSearchParams
hook from Nextjs.Reproduction
Please refer to this code sandbox.
Example: Steps to reproduce the behavior:
The text was updated successfully, but these errors were encountered: