[Vuejs]-Component template should contain exactly one root element nuxt

3👍

This problem is actually a very simple problem. I don’t know vue, but the render method has the same limits of react’s one: every component must have only one root element in its template.

This means that a situation like this isn’t accepted:

<template>
  <div></div>
  <div></div>
</template>

But like this is correct:

<template>
  <div></div>
</template>

This means that surely, somehow in the code you didn’t show us, you’re putting two elements as root of your template

Leave a comment