2👍
You can use computed properties:
export default {
props: ['userid'],
computed: {
userID() {
return this.userid
}
},
mounted() {
console.log(this.userID);
}
}
Or simply:
export default {
props: ['userid'],
mounted() {
console.log(this.userid);
}
}
Source:stackexchange.com