How do I display data through components with Vue.js (using Vueify)? How do I display data through components with Vue.js (using Vueify)? vue.js vue.js

How do I display data through components with Vue.js (using Vueify)?


The first warning means when you are defining a component, the data option should look like this:

module.exports = {  data: function () {    return {      listing: [          {            title: 'Listing title number one',            description: 'Description 1'          },          {            title: 'Listing title number two',            description: 'Description 2'          }        ]     }   }}

Also, don't put ajax requests inside computed properties, since the computed getters gets evaluated every time you access that value.