question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

useRouteQuery: Can't update multiple route query in the same tick

See original GitHub issue

CodeSandbox 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:closed
  • Created 2 years ago
  • Reactions:7
  • Comments:9 (2 by maintainers)

github_iconTop GitHub Comments

8reactions
WilcoKruijercommented, Sep 22, 2022

Not stale, please reopen. (I saw this 16 hours too late, sadly)

3reactions
renatodeleaocommented, Mar 16, 2022

Can also reproduce, trying to set daterange query params (starts_at, ends_at) => demo. Currently hacking by moving one of the setters to the nextTick (wrapping within setTimeout, but not an actual fix).

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found