Course lesson
Compare Vue 3 Setup Script with the Options API
If you've used Vue then you are probably familiar with the options API. So you might be confused with the component files that Vite generates.
- Duration
- 2 min
- Access
- Included
- Transcript
- Retained from source evidence
If you've used Vue then you are probably familiar with the options API. So you might be confused with the component files that Vite generates.
They are actually using Vue's new setup script syntax. Where instead of exporting an options object, you use a <script> tag with the setup attribute! This ends up looking nicer and makes your code more readable.