Keep-alive

Learn how keep-alive components optimize the performance of dynamic components.

We'll cover the following...

Overview

Vue offers a component called keep-alive that can be used to optimize the performance of dynamic components. Imagine we’re working on a shopping list app with tabbed navigation to let the user switch between their current and archived lists. The shopping list component displays a list and also allows a user to click on one of the list items to show more details about it. Below we can find the code for it.

Code example

The ShoppingListView component displays two buttons ...