activated Activated (Cached)
Last updated: 2026-10-22
activated Activated (Cached)
activated runs when a component cached by
| Group | Options: Rendering & Lifecycle |
|---|---|
| Kind | Option |
| Scope | Component |
| Vue Version | 3.0+ |
| SSR Support | Yes |
📝 Syntax
export default {
activated() {
this.start()
}
}
⚙️ Arguments
| value | No arguments |
|---|
Returns:No return value
▶ Example
Edit the code below and see the live result:
Output:
Switching away and back accumulates activations while state persists.
💡 Key Points
ℹ️ Note Only fires inside KeepAlive.
💡 Tip Pair with deactivated for resume and pause.
⚠️ Warning It also fires on first mount — keep it idempotent.
🏷️ Related Rendering & Lifecycle
💡 Related Cases
More case studies coming soon.
📚 Related Tutorials
❓ FAQ
Q Difference from mounted?
A mounted once; activated on every re-entry.
Q Is state preserved?
A Yes — that is KeepAlive's purpose.
Q Can I fetch here?
A Yes — the canonical refresh-on-return spot.