Sign in

Vue then operation questions

user846566 edited in Tue, 11 May 2021
}).then(function (response) {
   return response.json();
}).then(function (response) {
   _this.error = false;
3 Replies
commented on Tue, 11 May 2021

The first then is to JSON the return value, and the second then is to complete the specific business through the return value

I think this may be due to the separation of logic. Similar to the combination of functions, the input and output of each function is fixed, which is also convenient for later modification.

commented on Tue, 11 May 2021

This should be the chaining operation of ES6 functions. If you're right, you should use asiox. Can go familiar with the arrow function, and functional chain call, and then to understand what you said

commented on Tue, 11 May 2021

Click here

lock This question has been locked and the reply function has been disabled.