Problem
The this.stuffProp won't reflect the vue instance in arrow functions.
export default {
props: ['stuffProp'],
data: () => ({
myData: 'someData',
myStuff: this.stuffProp // The this.stuffProp won't get the stuffProp prop's value.
})
}
Suggest
export default {
props: ['stuffProp'],
data() { // <== changed this line
return {
myData: 'someData',
myStuff: this.stuffProp
}
}
}