|
|
|
|
|
by chmod775
969 days ago
|
|
Promises already are a wrapper that can contain an error or a value, and using 'await' is basically unwrapping it. This library adds very little value and is just another layer of abstraction which removes the syntactic sugar that was added with the previous layer and tries to re-implement stuff we already have (like responding to uncaught errors). Just use base promises and .then/.catch etc if you want to deal with values/errors this way. Don't introduce another dependency that does almost nothing, and which others reading your code will have to familiarize themselves with. I get that this makes doing some things slightly more ergonomic and less verbose, but at the end of the day it saves you seconds while costing others who have to look up documentation/code of yet another library much more time. Not to mention yet another dependency with sub-dependencies you have to manage. It wants specifically rxjs ^7.8.1 despite only using stable parts of that API. I probably just spent more time evaluating this thing than it ever would have saved me. |
|
(All of that's not even to mention the confusion around what operations in the code actually perform asynchronous actions.)