Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Watch is triggered from previous route component #374

Closed
edikdeisling opened this issue Jul 16, 2020 · 1 comment
Closed

Watch is triggered from previous route component #374

edikdeisling opened this issue Jul 16, 2020 · 1 comment

Comments

@edikdeisling
Copy link

Version

4.0.0-beta.2

Reproduction link

https://jsfiddle.net/pqxarzkL/3/

Steps to reproduce

  1. Open jsfiddle
  2. Clear console
  3. Click button "change route"
  4. Watch console

What is expected?

I expect only one log from active route component.

What is actually happening?

Console contains 2 logs. One from active route component and another one from already destroyed component.


Vue documentation(https://composition-api.vuejs.org/api.html#watcheffect) says, that watchEffect "invoked after all component update effects". But in this case watchEffect invoked after component was destroyed.

@posva
Copy link
Member

posva commented Jul 16, 2020

Opened vuejs/core#1603

@posva posva closed this as completed Jul 16, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants