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

Yes I do.

Do you use JS or TS currently? We've had async/await since ES2017, it's supported everywhere you want, and there's no reason to see .then() chains anymore outside jokes regarding early 2000's film classic "Dude, Where's My Car?".

Pasting some code and cutting out the boring bits:

  const transaction = await makeTransaction(...);
  const signature = await sendAndConfirmTransaction(...);
  const tokenAccountsByOwner = await getTokenAccountsByOwner(...);
Even back when .then() chaining was used: chaining only existed because that was the only way we had to handle promises, rather than because it was a desirable syntax.


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

Search: