Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature: Use Composition API #606

Closed
mlmoravek opened this issue Oct 3, 2023 · 0 comments · Fixed by #651
Closed

Feature: Use Composition API #606

mlmoravek opened this issue Oct 3, 2023 · 0 comments · Fixed by #651
Assignees
Labels
breaking Breaking changes enhancement Improvements to existing features and functionality

Comments

@mlmoravek
Copy link
Member

Description

Refactor every component into a <script setup> syntax.

Why Oruga need this feature

Even if the Option-API is still a valide Vue API, the Composition-API provides severall improvement (Why Composition API?).

The <script setup> is the recommended syntax for using Composition API inside SFCs. It provides a number of advantages over the normal <script> syntax:

  • More succinct code with less boilerplate
  • Ability to declare props and emitted events using pure TypeScript
  • Better runtime performance (the template is compiled into a render function in the same scope, without an intermediate proxy)
  • Better IDE type-inference performance (less work for the language server to extract types from code)

https://vuejs.org/api/sfc-script-setup.html

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
breaking Breaking changes enhancement Improvements to existing features and functionality
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant