Vue Dynamic Components

up:: Vue Components

<component is='component-name'></component>

Show a component dynamically depending on which component name is passed on the is prop. You could connect a button to a Vue Methods and return the component name you want to show.

keep-alive

When switching components, the old one is ‘destroyed’. It is completely removed from the DOM.

<keep-alive>
<component is='component-name'></component>
</keep-alive>

When using keep-alive, the component is cached.