Dynamic Components
Learn about dynamic components in Vue.js.
We'll cover the following...
Vue.js provides the functionality to dynamically switch between components based on certain events. Dynamic components are a type of component that can be used to display different components when required. The <component></component> placeholder is placed where you want all the components to be displayed. The v-bind:is directive is used to bind the respective component to the <component></component> placeholder. Dynamic components are usually used to display content in tabs where one tab is active at a time while others hide.
Syntax
The component placeholder can be the place where the dynamic components need to be rendered and the v-bind:is directive defines which component will be displayed currently. The following code snippet shows how dynamic components can be used.
Indexing the components
The components that take the place of the <component></component> ...