Skip to content

Commit 7bb9835

Browse files
authored
Update custom-directives.md (vuejs#2885)
Removing `prevVnode` params from hooks where they aren't available.
1 parent 082ec4c commit 7bb9835

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

src/guide/reusability/custom-directives.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -111,23 +111,23 @@ A directive definition object can provide several hook functions (all optional):
111111
const myDirective = {
112112
// called before bound element's attributes
113113
// or event listeners are applied
114-
created(el, binding, vnode, prevVnode) {
114+
created(el, binding, vnode) {
115115
// see below for details on arguments
116116
},
117117
// called right before the element is inserted into the DOM.
118-
beforeMount(el, binding, vnode, prevVnode) {},
118+
beforeMount(el, binding, vnode) {},
119119
// called when the bound element's parent component
120120
// and all its children are mounted.
121-
mounted(el, binding, vnode, prevVnode) {},
121+
mounted(el, binding, vnode) {},
122122
// called before the parent component is updated
123123
beforeUpdate(el, binding, vnode, prevVnode) {},
124124
// called after the parent component and
125125
// all of its children have updated
126126
updated(el, binding, vnode, prevVnode) {},
127127
// called before the parent component is unmounted
128-
beforeUnmount(el, binding, vnode, prevVnode) {},
128+
beforeUnmount(el, binding, vnode) {},
129129
// called when the parent component is unmounted
130-
unmounted(el, binding, vnode, prevVnode) {}
130+
unmounted(el, binding, vnode) {}
131131
}
132132
```
133133

0 commit comments

Comments
 (0)