generated from chiffre-io/template-library
-
-
Notifications
You must be signed in to change notification settings - Fork 135
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
BUG
: Using urlKeys
option with history push makes state unresponsive to URL change
#758
Comments
Thanks for this great report! I can reproduce the error and I think I see where it's coming from, I'll have a fix out shortly. |
Could you try this and let me know if it solves the problem on your end?
|
Yup, this fixes the problem in my codebase as well. Thanks! |
🎉 This issue has been resolved in version 2.1.2 🎉 The release is available on: Your semantic-release bot 📦🚀 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Context
What's your version of
nuqs
?What framework are you using?
Which version of your framework are you using?
v14.2.0
Description
If you use the
urlKeys
option along withhistory: "push"
, then on pressing the browser back button, the query params get removed from the URL but the state variable returned byuseQueryStates
still shows the old value.This issue does not occur if you remove
urlKeys
.Reproduction
https://codesandbox.io/p/devbox/tender-paper-8sd759
Example: Steps to reproduce the behavior:
/working
route to see the correct behvaior. The steps to perform are written there. This page does not useurlKeys
hence it works well./not-working
route to see the incorrect behavior that happens when you addurlKeys
. The steps to perform are mentioned there.The text was updated successfully, but these errors were encountered: