# VNode Lifecycle Events
In Vue 2, it was possible to use events to listen for key stages in a component's lifecycle. These events had names that started with the prefix
hook:, followed by the name of the corresponding lifecycle hook.
In Vue 3, this prefix has been changed to
vnode-. In addition, these events are now available for HTML elements as well as components.
# 2.x Syntax
In Vue 2, the event name is the same as the equivalent lifecycle hook, prefixed with
<template> <child-component @hook:updated="onUpdated"> </template>
# 3.x Syntax
In Vue 3, the event name is prefixed with
<template> <child-component @vnode-updated="onUpdated"> </template>
vnode if you're using camel case:
<template> <child-component @vnodeUpdated="onUpdated"> </template>
# Migration Strategy
In most cases it should just require changing the prefix. The lifecycle hooks
destroyed have been renamed to
unmounted respectively, so the corresponding event names will also need to be updated.