Better HN
topnewbestaskshowjobs
Log inSign up

yeittrue

4 karma · joined Apr 7, 2026 (7mo ago) · 1 submissions

Submissions

comment 7mo ago · link · parent

Generators peaked in redux- saga and thunk days before we had widespread support for async/await.

You're right, mostly pointless syntax (along with Promise) now that we can await an async function anyway, especially now with for .. of to work with Array methods like .map

But there are still some use cases for it, like with Promise. Like for example, making custom iterators/procedures or a custom delay function (sync) where you want to block execution.