Re:Beware of Async/Await
by faizshah on Thursday July 30, 2020 @01:21PM
(#24000707)
I agree the example given is poor and as others have pointed out presents a race condition where a DB transaction would be better. I like the introduction to async/await from PouchDB blog: https://pouchdb.com/2015/03/05/taming-the-async-beast-with-e...
And their discussion of Promises: https://pouchdb.com/2015/05/18/we-have-a-problem-with-promis...