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.
❤️ Support This Blog
If this post helped you, you can support my writing with a small donation. Thank you for reading.
Comments
Post a Comment