Add a migration guide entry for renaming hook:
to vnode-
#857
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Vue 2 had lifecycle events, such as
hook:mounted
. These weren't really documented. The only mention of them in the official documentation that I can find is here: https://vuejs.org/v2/guide/components-edge-cases.html#Programmatic-Event-Listeners. Even that just shows them used in an example, with no direct explanation.While they tend to be used very sparingly, they were used by a lot of projects, so it's worth having some guidance on migration.
In Vue 3, you can use events such as
vnode-mounted
to achieve a similar effect.I've added an entry to the migration guide that describes this as a simple renaming. I'm not sure whether that's historically accurate but for practical purposes I think renaming will be enough to migrate code across.
The
hook:
events in Vue 2 didn't include any arguments/data with the event. If they had then it might make migrating more complicated. Thevnode-
events do include data but I don't think that needs to be mentioned for migration purposes.This is related to #828, though more work is needed for that.
The
vnode
events are mentioned in a merged RFC.Rendered: https://deploy-preview-857--vue-docs-next-preview.netlify.app/guide/migration/vnode-lifecycle-events.html