2 ms·
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 as
by faizshah 6y ago
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-es7.html 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-promises.html https://pouchdb.com/2015/05/18/we-have-a-problem-with-promis...