The script setup Syntax
<script setup> is compile-time sugar where top-level bindings are directly exposed to the template and the whole block runs as the component's setup() on each instance creation; compiler macros like defineProps are available without import, and the compiled output avoids the runtime cost of returning a binding object.
This Concept is waiting for its first lesson!
<script setup> is compile-time sugar where top-level bindings are directly exposed to the template and the whole block runs as the component's setup() on each instance creation; compiler macros like defineProps are available without import, and the compiled output avoids the runtime cost of returning a binding object.
Are you a teacher? Sign in to start contributing.
Sign In