The await is over! Learn how to make your JavaScript Promise code beautiful and concise with async-await github.com/codediodeio/async-... Jake Archibald's Talk: • Jake Archibald on the ... Demos with Angular: / @digitalfluency
I just made a promise to a friend of attending a surprise birthday tomorrow and I probably screwed it up because I also promised my family to go out on a trip the same day which I haven't resolved yet ugh.
I was debugging something for an hour and decided it's finally time to fully understand the async / await functionality, turns out the concurrent map execution was the issue lol. Thank you for the quality content (from 4 years ago), you are helping me a lot and everyone else in the community.
Promise Statements and Async Await are the favorite things I've recently learned about in JavaScript. This lecture was/is right at the borders of what I understand, and was challenging in a good way. I appreciate the visuals. I really appreciate the additional lecture resources you mentioned. I will study them and loop back to this periodically until I'm clear on what was presented.
Being new as a developer with just over a year coding and picking up JS as my main language a couple of months back, this video explains so many of the issues I have encountered coming from a synchronous language (Java and Python) to async in JS and TS. This channel does a great job of explaining essential concepts to newcomers like me. I'm glad I found the channel. Thanks!
This video is from Oct 11, 2018. It is still one of the best explanation I have ever seen. It is just so clear. And that recommended video about the NodeJS event loop is a must-watch for JavaScript developers. I am an Android Developer and I saw that video. So if you are JS Dev and you did not, you might be a bit late. No worries there is still time. :P
It's good that you explain the background of async/await! I consider those keywords both a blessing and a curse. In my experience, people new to JavaScript use it without knowing what's going on in the background. This often leads to bad results which they don't know how to resolve. When you know how promises work, you can actually appreciate what async/await is abstracting away for you.
When I started working with Promises, it took me a while to realise that the _.then()_ was pretty much the same problem as the callback. And the big problem for me was that outside the "then()", I had no way of knowing WHEN the then has resolved, or even if it had at all. "Await" is much better.
Yep, I also went to check in the comments whether smth had been already mentioned on that point, so that just not to blurt out anything silly. :) Still I really love to re-watch these tutorials now and then!
i swear to god for every two minutes i spent watching this video, i had to pause and go read about 2 hours worth of material. Totally worth it tho, i love this fast paced style of teaching.
Hats off to you, you legend. It's mad that you can symmarize all of these concepts into just 12 minutes while making more sense then all the other videos out there that take 3-4 times longer.
It’s insane how quickly JS is developing new features. So excited to see what happens next or if we can get an ES based typing system. Thanks for the vid!
I love this channel and maintain a pro subscription over on their site and have found it to be more than worth the price of subscription, free access to current and upcoming courses is amazing and I love how a lot of the pro videos are a direct and more in-depth look at an earlier free video with an emphasis on real world use case scenarios. This video is excellent and really helped me to further understand how and more importantly when and when not to use async await in my code. Thanks again man and keep producing incredible content!
Great video! But I wondered if there might be a mistake around 8:00 on the right side. Shouldn't it be 'a = v' instead of 'v = a' if the code should be doing the same? Thanks.
Man you definitely deserve much of the credit for the success of my future StartUp^^ Please don't stop, your videos are making the world a better place, thank you
Before I watched a lot of your videos I was in the first part of the Dunning-Kruger effect, but after watching a ton of your videos I now realize how much I don't yet know.
I did not get it the first time I watched this episode, but now I know a bit more about javascript and when I came back for a review I laughed so hard XD
Ok newbie on JS and programming here. Didn't understand most of it, but is fun watching intermediate/advanced content like this and wonder if in my future I'll be able to comprehend and do all of this by myself.
This is top tier stuff. I've been watching Fireship for like 2 years, but it's only now that I'm finding myself forced to actually learn webdev for good. These old videos are still incredibly sharp, I'm really impressed.
after studying and learning javascript, getting certificates from 4 different online completed courses, I watch this video, get depressed and rip up all my certificates and start all over again. so depressing :( because i now feel like I didnt learn shit from those courses and have to start all over again from scratch. ooh well, back to html and css and eventually javascript yet again :(
Got one question that's been bugging me and I can't wrap my head around it. The code on the right - line 67, shouldn't it be inverted? meaning a = v? Because otherwise you would be assigning *v* to an undefined value, and what you should be aiming for is to store the value you have in *v* into *a*, that's the propose of *a*, right? (Pleas someone tell me what I'm missing, thank you)
no jokes? i feel REJECTed didn't know about the for loop stuff, cool! about the try/catch: should i wrap all the awaits in one or use a separate try/catch for each await to treat better different errors? great video as always!
That's a great question and almost included a section, but vid was getting long. I would say only 1 try/catch per function, but you might want to chain a catch call back to individual promises for fine grained error handling as needed.
Found your video of right good code not 💩 in my feed, loved you style of explanation and the way you provide the video editing is exceptional 🤩 one of the channels I'll definitely share and follow!
Async/Await is a double-edged sword. It's a great addition to Javascript but it's also massively misused. I'm trying not to sound "elitist" here, but the complexity of promises and RxJS set a barrier for entry. People needed to understand how to write reactive code, work with asynchronous functions, etc. Now Async/Await has become the hammer for every timing bug that looks like a nail. I've seen the async and await keywords peppered through code in the hope it will magically fix a timing issue, mountains of code needlessly synchronised to the point it's stuttering to a halt on every page load. Hopefully people will take your "trolling" on board and gain an understanding of how it works. Really happy to see the pitfalls covered as well as the benefits.
I agree with you 100%, that's actually why highlighted some of the misuse and started with the event loop. Overall though, its had an overwhelmingly positive impact on the projects I've been involved with.
Seems pretty simple to me. Batch non-dependent promises with promise.all(), await promises, don't await synchronous code. Surely the benefits of async/await far outweigh the people using it wrong.
You do know you are calling and running comment and winTshirt immediately, not waiting for the video to finish? I presume you meant to reference the comment function, not run it?
*then* takes a function reference. So unless your comment and winTshirt methods return a function, they would get executed immediately watchVideo() .then(comment) .then(winTshirt); or if you Don't want to use response from previous promise watchVideo() .then(videoWatched => comment()) .then(commented => winTshirt())
Nice, thanks so much. Jake Archibald really made it clear for me whats going on. Your stuff is always great and i always get something from it even if i think i know already.
Oh my god thank you! I will be watching this video every single time I need to write asynchronous javascript for the foreseeable future. I have been making a couple of these mistakes you pointed out. This video deserves 20 billion views.
I think It’s better as it is - simply as mentioned above - It’s more efficient to rewatch the whole video or a part of it for the sake of understanding rather than get a long one with slow explanation that usually tends to make the viewer get bored and lose focus
Whoa whoa, slow down a little man. Great content but you are going way too fast. I know it definitely takes more effort and may not be worth it, but if you type out the code instead of coping and pasting the slowed pacing will make it much easier for your audience to grasp the concepts.
I admire how you explain why async await even exists in the first place and that you should use it in a certain way to achieve maximum efficiency. Keep it up ur the best, OG subscriber :)
Im teaching myself Async Await in Python right now. Was very confused at first. I got my code to run, but this video helps me understand it better still.
very very good explanation. detailing use-cases. mentioning common pitfalls. if everyone explained things like that, by now we would have conquered our local stellar environment 🚀✨