[Vuejs]-Setter method of the computed property does not get called

3👍

The docs show that there is no arrow function used with getter/setter

const fullname=computed({
  get() {
    return inputFirstName.value + " " + inputLastName.value
  },
  set(value) {
    const splitted = value.split(" ")
    inputFirstName.value = splitted[0] 
    inputLastName.value = splitted[1] 
  }
})
👤yoduh

Leave a comment