unmounted Unmounted
Last updated: 2026-10-22
unmounted Unmounted
unmounted runs after the instance is destroyed and its DOM removed — the final place for resource release.
| Group | Options: Rendering & Lifecycle |
|---|---|
| Kind | Option |
| Scope | Component |
| Vue Version | 3.0+ |
| SSR Support | Yes |
📝 Syntax
export default {
unmounted() {
// the instance is gone
}
}
⚙️ Arguments
| value | No arguments |
|---|
Returns:No return value
▶ Example
Edit the code below and see the live result:
Output:
Toggling off logs 'child destroyed'.
💡 Key Points
ℹ️ Note Vue already stops the instance's effects — handle only external resources.
⚠️ Warning Avoid DOM access here.
🏷️ Related Rendering & Lifecycle
💡 Related Cases
More case studies coming soon.
📚 Related Tutorials
❓ FAQ
Q Do I still stop watchers?
A No — destruction stops them.
Q Which nested component unmounts first?
A The parent's beforeUnmount fires first, then children tear down.
Q Does it run under SSR?
A No — browser only.