You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
There seems to have been a change from Vue 2 to Vue 3 that changed the behavior on when watchers are triggered. I have linked a minimal example where a component is hidden depending on $route.query and in the component itself I watch for changes. Expected is that when the component is hidden, the watcher is not triggered. But it is triggered before the component is hidden. Was correct in Vue 2, in Vue 3 it feels wrong. It has many implications to how the component would have to be written.
Open the link above and follow the steps to reproduce it.
What is expected?
The subcomponent is hidden without the watcher being triggered.
What is actually happening?
The watcher is triggered and then the component is hidden.
Vue version
3
Link to minimal reproduction
https://github.com/dword-design/try-vue3-route-query-watch
Steps to reproduce
There seems to have been a change from Vue 2 to Vue 3 that changed the behavior on when watchers are triggered. I have linked a minimal example where a component is hidden depending on
$route.query
and in the component itself I watch for changes. Expected is that when the component is hidden, the watcher is not triggered. But it is triggered before the component is hidden. Was correct in Vue 2, in Vue 3 it feels wrong. It has many implications to how the component would have to be written.Open the link above and follow the steps to reproduce it.
What is expected?
The subcomponent is hidden without the watcher being triggered.
What is actually happening?
The watcher is triggered and then the component is hidden.
System Info
Any additional comments?
No response
The text was updated successfully, but these errors were encountered: