[3.x Syntax](https://v3.vuejs.org/guide/migration/custom-directives.html#_3-x-syntax) ```js const MyDirective = { beforeMount(el, binding, vnode, prevVnode) {}, mounted() {}, beforeUpdate() {}, // new updated() {}, beforeUnmount() {}, // new unmounted() {} } ```