Vue 3의 꽃 Composition API
<template> <h1>{{ msg }}</h1> </template> <script setup> const msg = 'Hello World!' </script>
<style> var injections
오버헤드 없이 CSS-in-JS 효과
<template> <div class="text">hello</div> </template> <script> export default { data() { return { color: 'red', font: { size: '2em', }, } }, } </script> <style> .text { color: v-bind(color); /* expressions (wrap in quotes) */ font-size: v-bind('font.size'); } </style>