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