I have the following component in VueJS, which I declare before the instance of Vue
Vue.component('list', {
template: '
<div>
<ul>
<li v-for="dato in datos">
<span v-if="dato.id <= 3">{{ dato.title }}</span>
<span v-else>
{{ dato.title }}
</span>
</li>
</ul>
</div>
'
})
Which I want to invoke in my HTML, in this way
<list></list>
But from the console I receive this error
"[Vue warn]: Property or method \" data \ "is not defined on the instance but referenced during render. Make sure that this property is reactive, either in the data option, or for class-based components, by initializing the property. See: link .
found in
--- > "
I can not understand how to solve the problem, I found in a forum that I had to include all the information within a single element root
and the recommendation was a div
but it still marks me wrong