Mastering async code with Typescript and Javascript

Veröffentlicht am: 01 Januar 1970
auf dem Kanal: Jack Herrington
81,015
2.8k

Async code can be some of the hardest code to write in Typescript and Javascript, and we write it all the time. So let's build up some patterns for writing async/await code well, doing multiple stacked async calls, testing our async code, using promises for caching, and even supporting old school callbacks.

Code: https://github.com/jherr/async-with-ts
PokeAPI: https://github.com/PokeAPI/pokeapi#do...
Promise pool: https://www.npmjs.com/package/@superc...
MSDN Promises documentation: https://developer.mozilla.org/en-US/d...

00:00 Introduction
00:32 Project setup
02:31 Promises with then
04:55 Error handling with catch
06:30 Promises with async/await
08:55 Error handling with try/catch
12:15 Making your own promises
13:39 Promises as a cache
16:00 Async looping
20:30 Promise.all
22:15 Promise pooling
24:11 Testing async code
28:55 Async in React
33:19 Callbacks and Function Overloading
38:22 Outroduction
38:48 Requisite silliness

👉 What's my theme? Night Wolf [black]
👉 What's that font? MonoLisa
👉 Jack is also on the React Round Up podcast: https://devchat.tv/podcasts/react-rou...
👉 Don't forget to subscribe to this channel for more updates: https://bit.ly/2E7drfJ
👉 Discord server signup:   / discord  

💢 Watch our other videos:
💟 Hacking your Github contribution graph:    • Hacking Your Github Contribution Graph || ...  
💟 More Typescript videos:    • JavaScript to TypeScript: Beginner to Master  

Thank you for watching this video, click the "SUBSCRIBE" button to stay connected with this channel.

#async #await #javacsript #typescript #react


Auf dieser Seite können Sie das Online-Video Mastering async code with Typescript and Javascript mit der Dauer stunde minuten sekunde in guter Qualität ansehen, das der Benutzer Jack Herrington 01 Januar 1970 hochgeladen hat, den Link mit Freunden und Bekannten teilen, dieses Video wurde auf Youtube bereits 81,015 Mal angesehen und es wurde von 2.8 tausend den Zuschauern gefallen. Viel Spaß beim Betrachtenden Zuschauern gefallen!