javascript - Accessing VUE JS's data from Axios - Stack Overflow

PHOTO EMBED

Tue Feb 22 2022 07:45:31 GMT+0000 (Coordinated Universal Time)

Saved by @arnoa69 #javascript

send: function() {
  let self = this
  axios.post(this.api + "orders", this.order).then(function(response) {
    self.message = "Your payment was successful"
  }
}
content_copyCOPY

Code from stackoverflow: shoes in 1 of 3 code variations, when using this in a function scope

https://stackoverflow.com/questions/45216998/accessing-vue-jss-data-from-axios