feat: show VNode lifecycle events as 'built-in'#1036
Merged
webfansplz merged 1 commit intovuejs:mainfrom Feb 5, 2026
Merged
Conversation
✅ Deploy Preview for vue-devtools-docs canceled.
|
@vue/devtools-applet
@vue/devtools-core
@vue/devtools
@vue/devtools-api
@vue/devtools-kit
@vue/devtools-electron
@vue/devtools-shared
@vue/devtools-ui
vite-plugin-vue-devtools
commit: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Fixes #878 .
Vue includes some built-in lifecycle events for VNodes. See:
These don't need to be declared by components, as they're implemented by Vue itself and aren't emitted manually.
Rather than rendering them as
Undeclared, I've added a third state,Built-in:While these lifecycle events are rarely used directly, Vue Router adds a
vnode-unmountedlistener to route components. Showing that listener asUndeclaredis misleading, implying user error.I've included a tooltip for the new state. I don't think there's currently any way to see that tooltip, as they aren't implemented in the UI, but I'll attempt a fix for that in a separate PR.
Side note: I tested this using the Vite plugin. I kept running into problems and eventually realised these were being caused by the
Vue.js devtoolsChrome extension. I wasn't intentionally using the Chrome extension, it just happened to be installed. My code was setting the values toBuilt-inand the extension was overwriting that withUndeclared. Once I realised I just disabled the extension, but the thought occurs that this sharing of data is likely to lead to compatibility problems more generally. I couldn't find this documented anywhere and it seems kinda scary that the extension can interfere like that.