Scaling UpLesson 19Free preview
Vue First SFC Page
This lesson is part of Vue · All levels
Summary
This page discusses how to create your first page with single-file components. A .vue file contains three main blocks: a template for display structure, a script setup for logic, and a style for CSS. With the setup script, everything declared in it is automatically available in the template without the need to return the object manually.
Key points
- The .vue file consists of template, script, and style blocks.
- The script setup simplifies the declaration because it does not require a manual.
- Importing components in the setup script can be used directly in the template.
- Style can be given a scoped attribute to only apply to that component.
- The entry point of the application calls App.vue through the main.js file.
Full lesson
Code examples and quizzes
Full lessons, code examples, and quizzes are available to subscribers. 5 questions.