useRouteQuery: Can't update multiple route query in the same tick
See original GitHub issueCodeSandbox example: https://codesandbox.io/s/vueuse-useroutequery-same-tick-i739c
Currently the route query update in useRouteQuery is updating with the old route.query
, which means that if in the same tick we try to set value of two route query (for example, swapping two values), only one of them would work.
Issue Analytics
- State:
- Created 2 years ago
- Reactions:7
- Comments:9 (2 by maintainers)
Top Results From Across the Web
angular - On query parameters change, route is not updating
I have changed the parameters from queryParameters to matrixParameters but with no success. I have gone through many links and answers. But, ...
Read more >How do I use route query? - SimCity 4 General Discussion
I have searched the forums already. I can use the building query just fine, but I can't/don't know how to query roads. I...
Read more >useRouteQuery - VueUse
Shorthand for a reactive route.query . ... import { useRouteQuery } from '@vueuse/router' const search = useRouteQuery('search') const search ...
Read more >Getting Query Params from Angular's Router - Ultimate Courses
In this post you're going to learn how get query params from the URL in Angular by ... and also how to subscribe...
Read more >@vueuse/router examples - CodeSandbox
vueuse-useRouteQuery-same-tick · peter50216 · vueuse-useRouteQuery-update-of-value · object-kaz · useRouteQuery not updating multiple params.
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Not stale, please reopen. (I saw this 16 hours too late, sadly)
Can also reproduce, trying to set
daterange
query params (starts_at
,ends_at
) => demo. Currently hacking by moving one of the setters to thenextTick
(wrapping withinsetTimeout
, but not an actual fix).