Pass data from parent to child component in vue.js
To pass data via props, you have to declare them in child component: module.exports = { props: [‘user’], created: function () { console.log(‘user data from parent component:’) console.log(this.user) //prints out an empty string } }