0

I am trying to render dynamic components. it doesn't work.

<component :is="comp" />

The variable comp is filled with the name of the component in the course of the process (CardComponent).

I don't get any error messages either. Nothing happens.

what should i can do?

1 Answers1

0

refs: https://stackoverflow.com/a/73029625/17662593

<script setup>
const foo = resolveComponent('foo')
</script>

<template>
  <div>
    <component :is="foo" />
  </div>
</template>