In Vue2 there was this fragment library: https://www.npmjs.com/package/vue-fragment?activeTab=readme
In Vue3 they added built-in fragment: https://v3-migration.vuejs.org/new/fragments
But how do I create a v-for with this built-in fragment without getting this error:
ESLint: The template root disallows 'v-for' directives.(vue/no-multiple-template-root)
It seems to me that the new built-in functionality is not as good as the old library.
This was working fine in Vue2, but it seems impossible to do in Vue3:
<fragment>
<template v-for="id in ids" :key="id">
<div class="1"></div>
<div class="2"></div>
</template>
</fragment>
Morco is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.