1👍
There are two ways to use the data property in vue
This is used when you are using vue in a root Vue instance
new Vue({
el: "#app",
data: {
name: 'Vue !'
}
});
This is used when you are using vue components
new Vue({
el: "#app",
data() {
return {
name: 'Vue !'
}
}
});
Are you using components?
Source:stackexchange.com