vue2-helpers icon indicating copy to clipboard operation
vue2-helpers copied to clipboard

Doesn't work with vue-use `useRouteQuery`

Open aantn opened this issue 3 years ago • 3 comments

See https://github.com/vueuse/vueuse/issues/902#issuecomment-962563704

aantn avatar Nov 07 '21 07:11 aantn

It looks like vue-router's problem. You can find the related issues from https://github.com/vuejs/vue-router/issues?q=NavigationDuplicated

ambit-tsai avatar Nov 09 '21 10:11 ambit-tsai

Is the behaviour the same with useRoute from Vue 3?

Using vue2-helpers breaks useRouteQuery from vue-use, however useRouteQuery seems to work fine with Vue 3. Would it be possible to fix this by updating vue2-helpers to not call replaceRoute when the query changes between two identical values?

aantn avatar Nov 09 '21 11:11 aantn

In Vue3, you must be using vue-router@4, and use vue-router@3 in Vue2. There are some differences between the two.

You may need the solution at No stacktrace on NavigationDuplicated error uncaught in promise #2881

ambit-tsai avatar Nov 09 '21 12:11 ambit-tsai