-
-
Notifications
You must be signed in to change notification settings - Fork 82
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
Leaving the route causes the trigger parameter to change to undefined
#86
Comments
This is relative to the router but in I couldn't reproduce it. It was a problem in the past and it got fixed so maybe you are using an outdated version? I updated the reproductions just to make sure but it seems to work. But a normal watcher shouldn't trigger in that case |
@posva Thank you for your very prompt response and help!! Minimal reproduction: Steps to reproduce:
Explicitly defining routes does present the same problem. I think I will raise this problem again at vuejs/router, thank you for your help!! |
It's worth trying to reproduce it using only Vue. In the issue I mentioned I added reproductions with Vue. Maybe adding a nested component reproduces the problem |
Please forgive me if I put the question in the wrong place.
Based on the following routing structure:
App.vue
:pages/posts.vue
:pages/posts/index.vue
:pages/posts/[id].vue
:When routing from
/posts/2
to/posts
, why iswatch()
in[id].vue
triggered andnewId
will beundefined
?[id].vue
seems to triggerwatch()
again before it is destroyed. Is this the expected behavior?related discussion: stackoverflow
main problem: why does the
watch()
trigger when a user has navigated away from[id].vue
?Thank you for your help!
The text was updated successfully, but these errors were encountered: