<script setup> là syntactic sugar cho Composition API — tất cả code bên trong tự động expose ra template mà không cần return.
- Gọn hơn: không cần
export default, không cầnreturn - Hiệu năng tốt hơn: compiler tối ưu hóa tốt hơn
- TypeScript integration tốt hơn
defineProps,defineEmits,defineExposethay cho options props/emits
Pitfall: biến và function trong <script setup> khác file KHÔNG cần export — tự exposed.