deactivated Deactivated (Cached)
Last updated: 2026-10-22
deactivated Deactivated (Cached)
deactivated runs when a cached component is hidden — it is not destroyed, so pause timers here.
| Group | Options: Rendering & Lifecycle |
|---|---|
| Kind | Option |
| Scope | Component |
| Vue Version | 3.0+ |
| SSR Support | Yes |
📝 Syntax
export default {
deactivated() {
this.stop()
}
}
⚙️ Arguments
| value | No arguments |
|---|
Returns:No return value
▶ Example
Edit the code below and see the live result:
Output:
Hiding pauses the clock; showing resumes it.
💡 Key Points
ℹ️ Note Deactivation is not destruction — avoid irreversible cleanup.
💡 Tip Pause polling, animations and subscriptions here.
🏷️ Related Rendering & Lifecycle
💡 Related Cases
More case studies coming soon.
📚 Related Tutorials
❓ FAQ
Q Difference from unmounted?
A Deactivation hides; destruction happens when the cache drops it.
Q Is state kept?
A Yes — it resumes on activation.
Q What should be paused?
A Timers, polling and animations.