Recall & Review
beginner
What is the purpose of the component in Vue?
The component caches inactive components to avoid re-rendering them, improving performance for expensive components.
Click to reveal answer
beginner
How does improve user experience with expensive components?
By caching components, lets users switch back without waiting for the component to reload or fetch data again.
Click to reveal answer
intermediate
Which Vue lifecycle hooks are called when a component is activated or deactivated inside ?
The activated() hook runs when the component is inserted back, and deactivated() runs when it is cached but hidden.
Click to reveal answer
intermediate
How can you control which components caches?
Use the include and exclude props with component names or regex patterns to specify which components to cache or ignore.
Click to reveal answer
beginner
What happens if you don’t use for expensive components?
The component will be destroyed and recreated every time it is switched, causing delays and repeated data fetching.
Click to reveal answer
What does the component do in Vue?
✗ Incorrect
Which lifecycle hook runs when a cached component becomes active again inside ?
✗ Incorrect
activated() runs when a cached component is inserted back into the DOM.
How can you specify which components should cache?
✗ Incorrect
include and exclude props let you control caching by component name or pattern.
What is a common use case for ?
✗ Incorrect
What happens to a component inside when it is not active?
✗ Incorrect
Inactive components inside stay cached in memory but are hidden from view.
Explain how works in Vue and why it is useful for expensive components.
Think about switching tabs or views without waiting for reload.
You got /4 concepts.
Describe how to control which components are cached by and mention relevant lifecycle hooks.
Focus on props and lifecycle hooks related to caching.
You got /4 concepts.