-
-
Notifications
You must be signed in to change notification settings - Fork 8.4k
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
Mixins watchers not triggered when watching same property #3966
Comments
I added an SFC playground without the router. It seems like the mixins watchers are being overridden instead of merged together so only the Component watcher is kept |
e2ca67b#diff-07826ed1d9f7699d925ee15d9212e2879af5320b155c0c878fc2dcba71b3e564L110-L113 This seems to be intentional. |
Yes, I saw these comment too. But I still think maybe we need triggered all watch in mixins. So I open a PR to fix it. Maybe we can discuss this behavior, and if we really don't need this feature, I will close that PR. |
IIRC we haven’t planned this breaking change for Vue 3. Maybe we should keep the old behavior? |
I also agree this breaking change is not intentional, the code commit specifically to align Vue 2 merge behaviors but fall short on the watch merging on same property. From the SFC playground created by @posva, it works until Vue 3.1.0-beta7 It also works on Vue 2.x which I recreate the minimal reproduction below: |
Version
3.1.1
Reproduction link
https://codesandbox.io/s/friendly-burnell-n27xm?file=/src/components/HelloWorld.vue
SFC Playground Clicking the button should display 3 times the change like in 3.0.11
Steps to reproduce
$route
)What is expected?
In 3.0.11, component and all its mixin watchers triggered
What is actually happening?
In 3.1.1, only the component watcher got triggered
The text was updated successfully, but these errors were encountered: