Performance: Script setup syntax
MEDIUM IMPACT
This affects the initial component compilation and runtime performance by simplifying component setup and reducing boilerplate code.
<script setup> import { ref } from 'vue'; const count = ref(0); function increment() { count.value++; } </script>
export default { data() { return { count: 0 }; }, methods: { increment() { this.count++; } } }
| Pattern | DOM Operations | Reflows | Paint Cost | Verdict |
|---|---|---|---|---|
| Options API | No difference | No difference | No difference | [!] OK |
| Script setup syntax | No difference | No difference | No difference | [OK] Good |