Ask HN: Why can't await be used from non-async functions?

This page summarizes the projects mentioned and recommended in the original post on news.ycombinator.com

Our great sponsors
  • SurveyJS - Open-Source JSON Form Builder to Create Dynamic Forms Right in Your App
  • InfluxDB - Power Real-Time Data Analytics at Scale
  • WorkOS - The modern identity platform for B2B SaaS
  • AspNetCoreDiagnosticScenarios

    This repository has examples of broken patterns in ASP.NET Core applications

  • Unfortunately, there are problems with both of those approaches: https://github.com/davidfowl/AspNetCoreDiagnosticScenarios/b...

    I don't know if it extends to other language implementations, but C# does not seem to have a reliable sync-over-async story.

  • Koa

    Expressive middleware for node.js using ES2017 async functions

  • What helped me understand async await concept was to understand the concept of generators in javascript. One quick way to do it was to implement generator using ES5 javascript.

    From generator then it was to see on how to implement async await using them. This was how 1.x version of koajs did (https://github.com/koajs/koa/blob/master/docs/migration.md).

    Another way was to understand how polyfill for an implementation works. eg. https://github.com/facebook/regenerator

  • SurveyJS

    Open-Source JSON Form Builder to Create Dynamic Forms Right in Your App. With SurveyJS form UI libraries, you can build and style forms in a fully-integrated drag & drop form builder, render them in your JS app, and store form submission data in any backend, inc. PHP, ASP.NET Core, and Node.js.

    SurveyJS logo
  • regenerator

    Source transformer enabling ECMAScript 6 generator functions in JavaScript-of-today.

  • What helped me understand async await concept was to understand the concept of generators in javascript. One quick way to do it was to implement generator using ES5 javascript.

    From generator then it was to see on how to implement async await using them. This was how 1.x version of koajs did (https://github.com/koajs/koa/blob/master/docs/migration.md).

    Another way was to understand how polyfill for an implementation works. eg. https://github.com/facebook/regenerator

NOTE: The number of mentions on this list indicates mentions on common posts plus user suggested alternatives. Hence, a higher number means a more popular project.

Suggest a related project

Related posts