[RFC] deep watch allow setting condition for skipping object #712
kimverchan
started this conversation in
RFC Discussions
Replies: 1 comment
-
The motivation part should include practical real world examples. Right now it repeats what can be read with the simple examples. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Start Date: 2024-10-15
Target Major Version: 3.x
Implementation PR: vuejs/core#12157
Summary
If you want to skip the dependency collection of an object when deeply watch to an object, you cannot do so currently. Add the skip attribute to watchOptions to do this.
Examples
Result Playground
Motivation
When using the
watch
function to observe objects in depth, suppose that the object to be observed contains a specific object that does not need to be observed, but the specific object cannot be determined by depth. In this case, you can use theskip
option to control the monitoring conditions to avoid unnecessary observations.Beta Was this translation helpful? Give feedback.
All reactions