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
When going from one page to another (category.vue to product.vue), effects from the old page are executed. Watch does not behave this way as fixed in here: vuejs/core#2291
What is expected?
When switching from one page to another, only effects from the new page are executed.
What is actually happening?
When switching from one page to another, effects from both pages are executed.
The text was updated successfully, but these errors were encountered:
This is expected as effect is immediate and the same behavior happens in vue. This is because they are immediate so the same happens with immediate: true. Use a regular watch or flush: 'post' instead and it will work as described in the issue even with vue-router in your reproduction
Version
4.1.5
Reproduction link
jsfiddle.net/djw2mbhk/
Steps to reproduce
When going from one page to another (category.vue to product.vue), effects from the old page are executed. Watch does not behave this way as fixed in here: vuejs/core#2291
What is expected?
When switching from one page to another, only effects from the new page are executed.
What is actually happening?
When switching from one page to another, effects from both pages are executed.
The text was updated successfully, but these errors were encountered: