-
-
Notifications
You must be signed in to change notification settings - Fork 8.2k
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 deep options incorrect action #11983
Comments
Please provide a minimal reproduction. |
deep: true will output trigger but false not |
This behavior is expected. According to the docs: https://vuejs.org/api/reactivity-core.html#watch
In your case, |
Firstly, my initial question was about whether to enable deep or not, and the behavior should be consistent (even if the value of other attributes changes when deep is enabled, it will not trigger the observer for that attribute). The link explains another issue, that is, when deep is enabled, if the attribute source that the getter depends on is replaced, even if the return value remains unchanged, the observer will still be triggered |
Vue version
3.5.6
Link to minimal reproduction
no
Steps to reproduce
1.case1
2.case2
when use deep: true; number no change but other prop of obj change trigger still (Verified not to trigger when other change)
What is expected?
Consistent behavior
What is actually happening?
no Consistent behavior
System Info
Any additional comments?
No response
The text was updated successfully, but these errors were encountered: