What does the
<KeepAlive> built-in component do when it wraps a dynamic component?- aIt forces the wrapped component to re-render on every parent update
- bIt caches the component instance instead of destroying it✓
- cIt prevents the component from ever mounting until it becomes visible
- dIt automatically lazy-loads the component's JavaScript bundle
Explanation:
<KeepAlive> preserves the component instance (including its state and DOM) in memory when it's toggled out of view, instead of unmounting/destroying it. When toggled back in, the same instance is reused rather than created fresh — this is why forms and scroll positions survive tab switches wrapped in <KeepAlive>.