// ...
computed: {
fullName: {
// getter
get: function () {
return this.firstName + ' ' + this.lastName
},
// setter
set: function (newValue) {
var names = newValue.split(' ')
this.firstName = names[0]
this.lastName = names[names.length - 1]
}
}
}
// ...
// ...
computed: {
fullName: function (salut) {
return salut + ' ' + this.firstName + ' ' + this.lastName
}
}
// ...
vue.common.js:2250 Uncaught TypeError: fullName is not a function(…)
Write your answer...
This one I feel is good by design, but don't know if it contradicts the Vuex cycle of uni-directional data flow. Basically, is it considered good practice to return a promise(-like) object from an
Aditya Agrawal
Learning resources & tutorials
Asked • Jun 13 2019