Skip to content

Commit bba2b7c

Browse files
hitautodestructphanan
authored andcommitted
Extended watch API documentation (#2135)
Added another example of how to use watch handler and elaborated on `deep` comment.
1 parent 266b7f7 commit bba2b7c

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/v2/api/index.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -674,14 +674,14 @@ type: api
674674
},
675675
// string method name
676676
b: 'someMethod',
677-
// deep watcher
677+
// the callback will be called whenever any of the watched object properties change regardless of their nested depth
678678
c: {
679679
handler: function (val, oldVal) { /* ... */ },
680680
deep: true
681681
},
682682
// the callback will be called immediately after the start of the observation
683683
d: {
684-
handler: function (val, oldVal) { /* ... */ },
684+
handler: 'someMethod',
685685
immediate: true
686686
},
687687
e: [

0 commit comments

Comments
 (0)