Async/Await without Promises
at paolo.fr▼4 up and 3 down, posted by
4 up and 3 down, posted by
Care to elaborate some more? The author shows how to account for errors in scenarios where there are potential errors for example a network request, so im not sure where you see it being bad advice overall, care to clarify your point?
const Foo = { async then (done) { done(await request('https://foo.com')) } } What happens when request throws an error (or the promise rejects)? ... in this case, there's no value to it.