Search Params with the Same Name Get Mixed Between Pages When Clicking (browser) Back Button #1293
-
|
Hi everyone, I noticed that if I have 2 pages with the same search-param name - when I click I made a tiny example - please tell me if I made a mistake or something.. It's a simple This is the GitHub repo: https://github.com/itay-perry/react-router-nuqs-test 🙏
To see the behavior just open the console:
Is this the default behavior? Why does this happen? |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 12 replies
-
|
Thanks for the reproduction! I see also the issue where A gets the value of B before navigation has finished when clicking I wonder if this is the same issue as #947 or #1156 (though they are from different adapters), where pages are rendered in the background, and since there is only one URL, depending on the direction, one of the pages will have a stale value until the navigation has finished. |
Beta Was this translation helpful? Give feedback.
-
|
We're hitting this as well. In our case, pages with shared query param names (like |
Beta Was this translation helpful? Give feedback.
-
|
I have a fix for this in #1316 (it's @itay-perry's really) with a proper test to validate it, could y'all try it please? cc @netaneldr @romansndlr pnpm add https://pkg.pr.new/nuqs@1316 |
Beta Was this translation helpful? Give feedback.

I have a fix for this in #1316 (it's @itay-perry's really) with a proper test to validate it, could y'all try it please? cc @netaneldr @romansndlr