Await is a reserved word error

Solution:

In order to use await, the function directly enclosing it needs to be async.
example codes:

async tryGetUserName() {   let session = await Auth.currentSession();   ...... } 

async should be there, otherwise you will get the error.

No comments:

Post a Comment

@qzl/typed-i18n — Our Open-Source Typed i18n Project is Gaining Traction

 Hello everyone! 👋 We are excited to share an update about one of our open-source projects , @qzl/typed-i18n , created by the QZ-L.com team...