Mastodon-Bot icon indicating copy to clipboard operation
Mastodon-Bot copied to clipboard

Redo with promises

Open shiffman opened this issue 7 years ago • 1 comments

Should I redo the earlier bot examples with promises? It's tricky b/c I'd like that to be available, but I used callbacks in the videos so would make it hard to follow along. Maybe I should make both available!

shiffman avatar Oct 05 '18 21:10 shiffman

If you or someone else is going to take the time to re-factor away from callbacks I would suggest skipping Promises and generator functions and jumping straight to async/await.

  • https://hackernoon.com/6-reasons-why-javascripts-async-await-blows-promises-away-tutorial-c7ec10518dd9
  • https://javascript.info/async-await
  • https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/async_function

hollyos avatar Oct 06 '18 09:10 hollyos