-
Notifications
You must be signed in to change notification settings - Fork 96
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
React Router - Concurrent updates fail #54
Comments
Hmm, yea that's annoying one solution is #53 at first glance. But maybe there's another where we can re-read the URL just before updating to ensure we have the latest value. |
Reading through I'm not sure how batching would work with this.. happy to help implement something if you have an idea. The problem spans from the fact they both use the For anyone that comes here looking for an immediate workaround - you can wrap the call in a
|
Right, this is why I suggested we can re-read the URL just before updating to ensure we have the latest value. Batching would avoid this problem since it would combine the edits into a single edit to do at the same time. But doing batching requires making useQueryParams asynchronous and is probably a substantial change. Unfortunately the only other ideas I have are to (a) read from |
In v0.4.5 |
This reverts commit dc46057.
Hey,
Thanks for the library I've been using it extensively!
Versions:
When calling two
setQuery
functions from the same "event" only one is updated.See this video
Reproducable code sample
https://codesandbox.io/embed/lucid-pike-g5vok
The usecase here is noddy but the implementation is the important part. In my use case I have two very different abstractions which is why they have seperate hooks and don't use
useQueryParams
insteadI believe it will be an issue with the way
use-query-param
usesreact-router
sRoute
componentI wanted to highlight the issue before investigating
The text was updated successfully, but these errors were encountered: