Vue.js · Component
KeepAlive
KeepAlive caches inactive dynamic components so their state survives when users switch between views. It can filter cached components by name and limit the cache size.
Last updated
Syntax
<KeepAlive [include="pattern"] [exclude="pattern"] [max="count"]>
<component :is="activeComponent" />
</KeepAlive>In-depth API docs are only for subscribers: parameters, examples, common mistakes and interview practice.
SubscribeRelated
componentTransitionactivateddeactivatedmountedunmounted