5 ms·
The article mentions that async/await functionality hasn't landed in Javascript yet. I wonder if you can get the same functionality today using scala.js [0] an
by zackangelo 11y ago
The article mentions that async/await functionality hasn't landed in Javascript yet. I wonder if you can get the same functionality today using scala.js [0] and the scala/async [1] library.
I believe it should work. The scala/async library is just a set of macros that transform blocks of code using async/await into for comprehensions.
[0] http://www.scala-js.org http://www.scala-js.org
[1] https://github.com/scala/async https://github.com/scala/async
- sotojuan 11y agoI have been using yortus' async/await library[1] for a simple personal project and honestly it works fine. I don't know if it's "serious/production" ready but it has a extensive README and examples. [1] https://github.com/yortus/asyncawait https://github.com/yortus/asyncawait
- sjrd 11y agoYes, Scala.js and scala-async work together out of the box.