Skip to content

Instantly share code, notes, and snippets.

@Kcko
Last active May 10, 2024 08:40
Show Gist options
  • Save Kcko/01eaba5a56b7e65a032ffe575085c75c to your computer and use it in GitHub Desktop.
Save Kcko/01eaba5a56b7e65a032ffe575085c75c to your computer and use it in GitHub Desktop.
<template>
<h1>test</h1>
<component :is="dynamicComponent" />
</template>
<script setup>
import { computed} from 'vue'
const dynamicComponent = computed(() => {
let template = `
<h3>Toto je dynamic component</h3>
<p>Nejaky text</p>
`
return { template }
})
</script>
<!--/* musi to byt jako bundle vue .. build, ne runtime vue */-->
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment