3 ms·
Vue single-file components (SFC[0]) still works this way. <template> <!-- Largely just HTML --> </template> <script setup lang="ts"> // JS
by CharlieDigital 5mo ago
Vue single-file components (SFC[0]) still works this way.
<template>
<!-- Largely just HTML -->
</template>
<script setup lang="ts">
// JS/TS as you would expect
</script>
<style scoped>
/* Component scoped styles here */
</style>
Very clean, easy to understand, and (as someone who started hand writing DHTML) it still feels very much like DHTML with more convenience and modern affordances.
[0] Vue SFC docs: https://vuejs.org/guide/scaling-up/sfc.html https://vuejs.org/guide/scaling-up/sfc.html