Scaling UpLesson 26Free preview
Vue Local Components
This lesson is part of Vue · All levels
Summary
Local components are listed on the parent component via the components option so that they can only be used within the parent. This approach differs from the global component that registers to the app and is available anywhere. Local registration makes the dependencies between components clear and helps with coding and tree-shaking.
Key points
- Local components are listed via the components option in the parent component.
- Local components are only available in the parent template that registers them.
- Local registration makes the component dependencies more clear.
- Global registration uses app.component before mount.
- Composition API can import .vue files directly without special registration.
Full lesson
Code examples and quizzes
Full lessons, code examples, and quizzes are available to subscribers. 5 questions.