Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

I've actually never used any async/await stuff, so I didn't know that's what it's for. All that stuff appeared in JS (and elsewhere) after I stopped doing Web dev. These days I mostly write Haskell, which AFAIK doesn't need all of that async/await/promise stuff because its already covered by laziness.


`await` is essentially syntactic sugar that means "wrap everything after this in a callback to be executed after this function does something asynchronously."


I see. That would presumably still have the problem of multiple spinners, as I mentioned at the end of my original comment?


Yes. You'd want to guard against this running more then once, probably by disabling the button until the submit finished.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: