Zack Weiner
Zack Weiner

Reputation: 674

Can Hyperloop Work with the newest Async/Await?

I see that the examples on https://hyperstack.org/ describes making a fetch as a wrapper around priomsies.

I know that in JS async/await is syntatic sugar around promises, but Im curious if I can use the async/await pattern with the Hyperloop ruby wrapper around JS?

Upvotes: 1

Views: 81

Answers (1)

Mitch VanDuyn
Mitch VanDuyn

Reputation: 2878

Its not really needed. Essentially Async/Await is some syntactic sugar that makes async control easier to use.

In hyperstack you can just go ahead and use the "old fashioned" promises (which is what async/await boil down to) but they are just as easy to understand and take no more code.

If you care to post an example of of JS code using Async/Await, I can update the answer with the Hyperstack equivilent.

Upvotes: 1

Related Questions