Vue · Middle · Question 27 of 75

What does <KeepAlive> do?

<KeepAlive :max="5">
  <component :is="currentTab" />
</KeepAlive>

Explanation

Cached components receive onActivated/onDeactivated instead of being unmounted. include, exclude and max control what is cached.

Further reading

Problem with a question

Vue · Middle · question 27

Test yourself

Take the Vue · Middle quiz: questions and options are shuffled, and you get a review of your mistakes at the end.

Take this quiz