DEV Community

Discussion on: Why async code is so damn confusing (and a how to make it easy)

Collapse
 
dfockler profile image
Dan Fockler

This looks pretty neat. Having worked with async code before Promises were everywhere, they are a real trip to learn to use. Although the idea is used throughout the programming stack, it's definitely something useful to learn.

I think the coolest part of async/await style is that you can use try/catch to get errors instead of having to add a new function for every promise you unwrap.

Collapse
 
joelnet profile image
JavaScript Joel

Haha that's interesting! That was actually the main reason I disliked async/await, I had to wrap everything in a try/catch.

Guess it all depends on what your preferences are.