Fork me on GitHub
#clojurescript
<
2020-12-29
>
mss18:12:46

how are people handling unwrapping values from promises a la async/await when it comes to doing interop w vanilla js?

👀 3
p-himik19:12:58

By just calling (.then promise on-resolve). Or using some wrapper library, like promesa.

3
valtteri19:12:48

They are callbacks.. no matter how hard you try to hide them 🙂. Personally I prefer using vanilla promises. Promesa lib has a macro that looks like async/await.

valtteri19:12:12

The macro is named ‘plet’ if you want to look it up

valtteri19:12:23

It’s kinda cool but I think I’ve never used it in a serious project

lilactown19:12:59

I typically just chain .then, but have on one or two occasions used https://github.com/athos/kitchen-async