I have a very simple component. It receives an an array prop and it should render each component in specified by a key
<template>
<div v-for="(element, i) in builder" :key="'builder-' + i">
<div>
<component :is="getComponent(element.acf_fc_layout)" />
</div>
</div>
</template>
<script>
export default {
props: {
builder: {
type: Array,
default: () => [],
},
},
methods: {
getComponent(component) {
return 'builder-' + component
},
},
}
</script>
I put all my components inside ~/components/builder/xxxx.vue
getComponent return the string correctly and using it directly works with no issues> is there a workaround to make this work?? it's weird because this used to work in Nuxt 2!