I have uncancelled plans for world domination, as I discovered several months ago that this is actually possible, like this:

<template>
  <CoolComponent />
</template>

<script setup>
  import { h } from 'vue';
  const CoolComponent = () => h('marquee', 'wheeeeeeeeeeeeeeeeeeeeee');
</script>

Plans for world domination have been cancelled due to vue's <script setup> having no known way to use render functions.

Please send assistance.

Feb 13, 2022, 2:35 PM
1 0 3

comments (single view)

I’ve tried <script setup> and can't get used to it - it seems so unstructured compared to the Options API. I guess that's my personal opinion, but it just makes the most sense to me.

I know what you mean - I've recently discovered that when using complex logic it does become really confusing, especially with the lack of support for importing setup scripts from other files… I'm beginning to reconsider my life choices, but the new $ref macros/syntactic sugar, whilst incredibly annoying and unintuitive, also make it a lot easier to work with for me.

$ref is great imo! If I was any good at naming/organizing functions then I'd be tempted to start using <script setup> just because there's less boilerplate, but I don't trust myself to keep things organized.

View all comments