I have code that should receive data asynchrony:
methods : {
btn() {
console.log("Hello");
var url = "https://jsonplaceholder.typicode.com/users";
let mydata = await fetch(url);
console.log(mydata);
}
}
And I get the error:
Module build failed: SyntaxError: D:/app3/src/App.vue: await is a reserved word (19:19)
source
share