Playing: 028: Async + Await
Jan 17th, 2018
Async + Await👇 Download Show✏️ Edit Show Notes
If you are a small business or freelancer check out Freshbooks.com Cloud Accounting and get 30 days free. Make sure to enter SYNTAX into the "How did you hear about us" section.
- 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()
- Snack Packs
- Hasty Treats?!!!
- Error Handling Methods
- View my slides for some code examples.
- High Order Function
- Just handle the error when you
- Browser Support
- Babel it!
- Sick Tip
- Chrome's Autoplay is changing
- Details on this
- Visit chrome://media-engagement to see your scores