-
-
Notifications
You must be signed in to change notification settings - Fork 5k
Closed
Description
Version
4.0.6
Reproduction link
https://codesandbox.io/s/awesome-albattani-b1uvt
Steps to reproduce
In the linked CodeSandbox open the console and follow these steps:
- Click on
Route 2link - Click on
Homelink - Check URL bar and console output
What is expected?
After navigation from /route to / I should see the correct URL in the URL bar -> / and the console output should be:
Route.vue unmount
Navigated to: /
HelloWorld.vue mounted
What is actually happening?
After navigation from /route to /, the URL bar shows /?test=hello and the console output is:
Navigated to: /
Route.vue watchEffect: /
Route.vue unmount
HelloWorld.vue mounted
By having a watchEffect that depends on the route value this bug causes code to run after a route change happened and can trigger unintended side effects.
Metadata
Metadata
Assignees
Labels
No labels