[Vuejs]-Single "list" component vs. repeated individual components in Vue

1👍

You can do this by using the <component></component> helper that Vue provides to you.

<component v-for="(row, index) in rows" :key="`rows-${index}`"
           :is="RowRenderer"
           :row="row"></component>

You would write that in the template of the parent component, where the parent component includes the RowRenderer component:

components: {
  RowRenderer
}

Leave a comment