logoalt Hacker News

CharlieDigitaltoday at 2:33 PM0 repliesview on HN

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