'Use object destructuring prefer-destructuring [duplicate]
I am codding first time on Vue.js and I have problem. Can you describe me the solution or problem.enter image description here
Solution 1:[1]
const { data } = await ...
Use this in 108 and 97 lines.
Solution 2:[2]
Your promise object has a data element. Currently, you are accessing your data element using dot (.) syntax. ( Your promise object.data is returning data).
You can use object destructuring to directly access the data element from inside your promise object
const { data } = (await this.$api.auth.sighIN({
email: this.email,
password: this.form.password,
}));
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|---|
| Solution 1 | dinesh oz |
| Solution 2 |
