-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
Query doesn't update with custom stringify and parse using nested object #328
Comments
Nested objects are not checked right now. I think it will make more sense to check the string representation of the query although this means different orders will still create a new navigation |
I don't think that would be bad, though I guess it could impact the "exact" route if it also check the queries. Unless maybe there could be an option where we can compare the values ourselves to decide if they differ? Kind of feel string value could also be impacted by the way the query is encoded. I always used queries kind of in a different way where each component specifies what query parameters it cares about, validation rule for them, type, default etc.. and it triggers separate "queryChanged" callback when they do change, so in my case it would not make a difference as I'm not watching route change, but rather query change and route props if necessary, though it's also single level only so while I was experimenting with nested approach where each parameter is a custom formatted json in url and I stumbled upon this. |
The active link behavior changed and queries and hashes are not taken into account anymore |
@posva it still doesn't work, |
I removed the normalizeQuery call when a |
Seems good now, thanks! |
Version
4.0.0-alpha.13
Reproduction link
https://codesandbox.io/s/silent-architecture-htfrf
Steps to reproduce
Click "Page 1", click "Page 2".
What is expected?
After clicking "Page 2" the query should update.
What is actually happening?
The query is stuck on "Page 1"
This probably has something to do with nested query params? changing destination to
{ query: { users: 1 } }
works as expected.The text was updated successfully, but these errors were encountered: