Scaling UpLesson 30Free preview
Vue Dynamic Components
This lesson is part of Vue · All levels
Summary
Dynamic components allow Vue to render different components based on data, for example when the active menu changes. Vue provides a built-in component element with an is attribute that determines which component is rendered. To keep a component state stored while changing, keep-alive packaging components are available.
Key points
- The component elements with the :is select the component dynamically.
- The is value can be the name of a listed component or the object of a component.
- Keep-alive keeps the state components that were previously rendered.
- Dynamic components are suitable for tabs, wizards, and menus.
- The key can be provided so that the component is reconstructed when the id changes.
Full lesson
Code examples and quizzes
Full lessons, code examples, and quizzes are available to subscribers. 5 questions.