[HN Gopher] Coroutines in JavaScript for Web Components
___________________________________________________________________
Coroutines in JavaScript for Web Components
Author : HumanOstrich
Score : 6 points
Date : 2024-03-08 21:32 UTC (1 hours ago)
(HTM) web link (lorenzofox.dev)
(TXT) w3m dump (lorenzofox.dev)
| HumanOstrich wrote:
| Although I tend to mostly use async/await these days, I find the
| other JavaScript asynchronous primitives interesting. Generator
| functions, iterables, and async versions of the two.
|
| The author shows a plausible way to put these primitives together
| to create coroutines powering rendering and lifecycles for web
| components. And although I'm pretty familiar with the syntax
| involved, I still learned some new ways to put it together from
| this article.
|
| Also the author's previous intro article to coroutines in
| JavaScript might be helpful for learning the basic syntax and
| patterns: https://lorenzofox.dev/posts/coroutine/
___________________________________________________________________
(page generated 2024-03-08 23:00 UTC)