From 87ba279afbc3bf57f7fd508076f377542920ad76 Mon Sep 17 00:00:00 2001 From: Eduardo San Martin Morote Date: Thu, 17 Jan 2019 21:47:50 +0100 Subject: [PATCH] Add comments about $watch behavior with a function --- src/v2/api/index.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/v2/api/index.md b/src/v2/api/index.md index 8c3411c354..77fb63baf3 100644 --- a/src/v2/api/index.md +++ b/src/v2/api/index.md @@ -1486,6 +1486,9 @@ type: api // function vm.$watch( function () { + // everytime the expression `this.a + this.b` yields a different result, + // the handler will be called. It's as if we were watching a computed + // property without defining the computed property itself return this.a + this.b }, function (newVal, oldVal) {