diff --git a/src/v2/api/index.md b/src/v2/api/index.md index 37aa811232..cec4e33bc0 100644 --- a/src/v2/api/index.md +++ b/src/v2/api/index.md @@ -1017,7 +1017,7 @@ All lifecycle hooks automatically have their `this` context bound to the instanc - **Usage:** - Watch an expression or a computed function on the Vue instance for changes. The callback gets called with the new value and the old value. The expression can be a single keypath or any valid binding expressions. + Watch an expression or a computed function on the Vue instance for changes. The callback gets called with the new value and the old value. The expression only accepts simple dot-delimited paths. For more complex expression, use a function instead.
Note: when mutating (rather than replacing) an Object or an Array, the old value will be the same as new value because they reference the same Object/Array. Vue doesn't keep a copy of the pre-mutate value.
@@ -1029,11 +1029,6 @@ All lifecycle hooks automatically have their `this` context bound to the instanc // do something }) - // expression - vm.$watch('a + b', function (newVal, oldVal) { - // do something - }) - // function vm.$watch( function () {