- Async + Await
Freshbooks — Sponsor
If you are a small business or freelancer check out Freshbooks.com Cloud Accountingand get 30 days free. Make sure to enter SYNTAX into the "How did you hear about us" section.
- Wes' Async + Await talk on YouTube from DotJS
- Ryan Dhal (Creator of Node.js) original Node.js talk
- Callback Hell
- What is a promise?
- Promises are an IOU
- Async + Await IS promises
- What is Async + Await?
- How does the code look?
- Returning values from an await
- Performance Considerations
- MEGA PROMISES
- Here is an example:
- const [weather, store] = Promise.all(getWeather(), getStores());
- This stuff is 100% native
- Most new Browser APIs are build on Promises
- Some examples:
- await fetch(' https://api.github.com/users/wesbos').then(data => data.json())
- await (await fetch(' https://api.github.com/users/wesbos')).json()
- The Payment Request API
- You should listen to episode 006 on accepting money on the internet
- Web Animation API
- Snack Packs
- Hasty Treats?!!!
- Error Handling Methods
- View my slides for some code examples.
- High Order Function
- Just handle the error when you callIt().catch(dealWithIt);
- Node's process.on('unhandledRejection') event
- Browser Support
- Babel it!
- Sick Tip
- Chrome's Autoplay is changing
- Details on this
- Visit chrome://media-engagement to see your scores
Tweet us your tasty treats!
- 2018-01-17 17:19:51 UTC