Re:Beware of Async/Await
by lhorie on Thursday July 30, 2020 @12:20PM
(#23999933)
Am I the only one getting itchy fingers from the lack of normalization? This:
just seems far more straightforward across the entire stack (where each entry has a `member: boolean` or `type: someEnum` field)
[ Parent
| on HN ]
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...