[Vuejs]-How to have two vue props alter each other

0👍

You can trap any looping by putting a Computed Setter in the path, and only do the update via this setter.

See Computed Setter

computed: {
  endDateComputed: {
    // getter
    get: function () {
      return this.endDate
    },
    // setter
    set: function (newValue) {
      if (newValue !== this.endDate) {
        this.endDate = newValue
      }
    }
  }
}

Leave a comment