3 ms·
The only "magic syntax" I wish Svelte would borrow from other frameworks is a <template> tag to surround the component, in similar to how it already has <script
by ChocolateGod 2y ago
The only "magic syntax" I wish Svelte would borrow from other frameworks is a <template> tag to surround the component, in similar to how it already has <script> and <style>. You can do this with preprocessors but having it built in would be golden.
I like doing
<script lang="ts">
blah
</script>
<style>
blah blah
</style>
<template>
blah blah
</template>
- Sateeshm 2y agoIsn't <template> an HTML element?
- ChocolateGod 2y agoYes but apparently it's okay for Javascript to use it. https://developer.mozilla.org/en-US/docs/Web/HTML/Element/template https://developer.mozilla.org/en-US/docs/Web/HTML/Element/te...