No video

The last video on javascript promises you'll ever need to watch

  Рет қаралды 21,005

Web Dev Cody

Web Dev Cody

Күн бұрын

teaching about javascript promises
developer.mozi...
My VSCode Extensions:
- theme: material community high contrast
- fonts: Menlo, Monaco, 'Courier New', monospace
- errors: Error Lens
- extra git help: Git Lens
- tailwind css intellisense
- indent rainbow
- material icon theme
- prettier & eslint
- ES7+ React Snippets
------------
🤑 Patreon / webdevjunkie
🔔 Newsletter eepurl.com/hnderP
💬 Discord / discord
📁. GitHub github.com/cod...

Пікірлер: 56
@soniablanche5672
@soniablanche5672 Жыл бұрын
funny thing about await is that it works with any object that has a .then()/.catch() method, it doesn't have to be the built-in Promise class. This is pretty useful if one of your library you are using returns a pseudo-promise object or some sort of polyfill.
@mattsmith6828
@mattsmith6828 Жыл бұрын
"Promise.reject" is useful when you want a rejected Promise to propagate further down the chain, instead of being immediately resolved. This effectively allows us to change the behavior of Promise chaining so we can skip over ".then" methods that contains code which depends on the initial rejected Promise.
@AnkitKumar-tp8hc
@AnkitKumar-tp8hc 2 жыл бұрын
This video is excatly what title says, only video we need to understand promises. By far the best explanation I have ever seen. I have seen your other videos also like subscriber refractor and I totally love it. Please keep up the good work.
@parthmehta6180
@parthmehta6180 Жыл бұрын
I came across your channel a couple days ago, dude you made everything so simple to understand for me! Love the content bro. GODSPEED!
@mavdotjs
@mavdotjs 2 жыл бұрын
note that await works on not just promises, but anything with a `then` function, similar to how the $ syntax works on not just stores, but anything with a `subscribe` function
@WebDevCody
@WebDevCody 2 жыл бұрын
That’s cool to know, thanks for that info
@vamshikrishnareddy76
@vamshikrishnareddy76 2 жыл бұрын
I was about request you to make a full video on promises after watching your short video on promises but here it is thank you!!
@thydevdom
@thydevdom 2 жыл бұрын
Once again. A video right on time for the questions I’ve been having.
@vaayuvaahana5024
@vaayuvaahana5024 2 жыл бұрын
Learnt a lot! Thanks a ton. Also, can you pls do a video on refresh tokens? I learnt jwt from your video and realised there aren't many videos which explain what refresh toke ns are, and how to implement them. Pls do a video on refresh toke if time permits. Thanks again.
@Glinkis
@Glinkis 2 жыл бұрын
A good thing to mention is that instead of using Promise.all, you can initialize all your promises and await them where you need their resolved values. So if you only need one of the values if a condition depending on another resolved value is true, you only need to await one value.
@SachalChandio
@SachalChandio 2 жыл бұрын
Thanks a lot for your service.
@SachalChandio
@SachalChandio 2 жыл бұрын
my gratitude.
@wateenafzal2963
@wateenafzal2963 Жыл бұрын
Truly the last video needed what extention do you use for suggestions in IDE
@wateenafzal2963
@wateenafzal2963 Жыл бұрын
founded it in description 😁😊
@liquidwater02
@liquidwater02 Жыл бұрын
For a second I thought the video title said "The last video on javascript promises, i promise".
@syndg
@syndg 2 жыл бұрын
Amazing video dude! Have been following your content for a while. You make everything sound easy and approachable!
@Dorobila
@Dorobila 2 жыл бұрын
great video and great easter egg too.
@Paxters_
@Paxters_ 2 жыл бұрын
Would be Great to see tutorial about charts. I want to do coingecko clone but cant figure out how to do charts.
@marky9275
@marky9275 2 жыл бұрын
Great video and explanation, thanks! A little nitpick, I'm sure it's helpful but the linting errors and red highlighting were pretty distracting to watch
@WebDevCody
@WebDevCody 2 жыл бұрын
I’ll turn them off next time
@martDKNY
@martDKNY Жыл бұрын
This implementation save value, but do not have state, right? So we can resolve internal promise(in wrap) over again and return another wrapped 'promise'. new Promise makes an object, so where this (res,rej)=>{res(val)}, I mean executor where it will be store? In closure? It execute immediately, but res(val) always return new Promise? Urphh, complicated!
@KyselPoints
@KyselPoints Жыл бұрын
Why does my console always print, "Uncaught Reference error, Promise is not defined" even though I write the exact code you just taught? This promise thing is just eating my mind currently. I wrote promise code in vs code, in chrome (snippet), and even then the output is the same. I can't figure out why!
@theofanisbirmpilis7364
@theofanisbirmpilis7364 2 жыл бұрын
it would be really helpful if you made a video about the call stack
@SeibertSwirl
@SeibertSwirl 2 жыл бұрын
Good job babe!!
@mikopiko
@mikopiko 2 жыл бұрын
Babe!?
@alexander3293
@alexander3293 2 жыл бұрын
@@mikopiko she is his wife
@SeibertSwirl
@SeibertSwirl 2 жыл бұрын
@@YourExecellency bahaha y’all thought I was his stalker huh 😏 thanks for lookin out for him
@planetmall2
@planetmall2 2 жыл бұрын
Great job!
@rajeeshjohn8365
@rajeeshjohn8365 Жыл бұрын
*DOUBT* : Does promises run a certain set of codes synchronously while allowing other codes to run asynchronously? What I am trying to ask is if a code depends on the result of a time consuming expression, it can be wrapped in promises while those that does not require the result of the expression can run asynchronously?
@gordonfreimann
@gordonfreimann 2 жыл бұрын
i might be wrong but i think first c# has introduced async await keywords and the workflow.
@WebDevCody
@WebDevCody 2 жыл бұрын
Maybe idk, this isn’t a video on c#
@gordonfreimann
@gordonfreimann 2 жыл бұрын
@@WebDevCody oh i thought it was a python video.
@WebDevCody
@WebDevCody 2 жыл бұрын
@@gordonfreimann ah honest mistake, nah this was a video about go
@indrajeetgiri8099
@indrajeetgiri8099 Жыл бұрын
from inside this._wrap method you're returning an function with a value as an argument and storing the returned result inside this._then but from where you're calling that function and passing that value can you please explain...
@owenwexler7214
@owenwexler7214 Жыл бұрын
"The last video on javascript promises you'll ever need to watch" Do you....... PROMISE? I'll see myself out now.
@_Rohit_Kumaar
@_Rohit_Kumaar 2 жыл бұрын
Happy Coding ... 👍
@vamshikrishnareddy76
@vamshikrishnareddy76 2 жыл бұрын
Do you have any plans on doing projects with nodejs and SQL, orm ?
@WebDevCody
@WebDevCody 2 жыл бұрын
I often make videos using prisma which is an orm for sql
@vamshikrishnareddy76
@vamshikrishnareddy76 2 жыл бұрын
@@WebDevCody oh really i didn't know that. I will search for those tutorials. Is there any specific playlist ?
@mristau_eu
@mristau_eu 2 жыл бұрын
every async function will return a promise, so you can chain .then or .catch after the function call
@WebDevCody
@WebDevCody 2 жыл бұрын
I regret not mentioning that. I guess I’ll need one more video 😂
@mristau_eu
@mristau_eu 2 жыл бұрын
@@WebDevCody will be the last last video then ;) i actually like the fact you can add a catch to every promise that you await inside async function and in there log the actual error and throw it again with self defined error message to send it directly to the outer catch
@FakeRoba
@FakeRoba 2 жыл бұрын
WHAT IS THAT ERROR HIGHLIGHT TEXT PLUGIN NAME?
@WebDevCody
@WebDevCody 2 жыл бұрын
Error lens
@FakeRoba
@FakeRoba 2 жыл бұрын
@@WebDevCody Ty, and sorry for caps!
@kim92se64
@kim92se64 Жыл бұрын
24 minutes watched
@WebDevCody
@WebDevCody Жыл бұрын
48
@kim92se64
@kim92se64 8 ай бұрын
96@@WebDevCody
@eddies.8314
@eddies.8314 2 жыл бұрын
You promise?
@WebDevCody
@WebDevCody 2 жыл бұрын
No promises
@whisky8496
@whisky8496 2 жыл бұрын
@@WebDevCody Promise rejected!
@WebDevCody
@WebDevCody 2 жыл бұрын
@@whisky8496 it’s all settled then
@Kay8B
@Kay8B 2 жыл бұрын
Promise.allSettled() is good for use cases where you have several promises and your not dependant on all of them resolving, but you still want the ones that did resolve. Promise.all() will reject if one rejects but allSettled will continue even if one fails. Edit: Could you do a video on your linting or zsh, basically your coding setup.
@eternalmangekyo022
@eternalmangekyo022 2 жыл бұрын
//eslint-disable no-unused-vars Great video!
@kantyDarius
@kantyDarius 2 жыл бұрын
Great work man, you should consider PromiseAllSettled, is pretty useful.
@WebDevCody
@WebDevCody 2 жыл бұрын
I think I've used that maybe once or twice, but yeah I could see it's usecase
This is how I recommend you learn Recursion in Javascript
24:39
Web Dev Cody
Рет қаралды 32 М.
The important things to know about React state and renders
18:33
Web Dev Cody
Рет қаралды 27 М.
OMG what happened??😳 filaretiki family✨ #social
01:00
Filaretiki
Рет қаралды 13 МЛН
managed to catch #tiktok
00:16
Анастасия Тарасова
Рет қаралды 48 МЛН
English or Spanish 🤣
00:16
GL Show
Рет қаралды 8 МЛН
나랑 아빠가 아이스크림 먹을 때
00:15
진영민yeongmin
Рет қаралды 4,5 МЛН
JavaScript Promises Crash Course
24:03
Kevin Powell
Рет қаралды 34 М.
This is the Only Right Way to Write React clean-code - SOLID
18:23
Generics: The most intimidating TypeScript feature
18:19
Matt Pocock
Рет қаралды 172 М.
Whats the Difference Between Callbacks and Promises?
8:39
Coding With Chaim
Рет қаралды 17 М.
Разбор Promise и создание собственной имплементации MyPromise | JavaScript
50:05
Елена Литвинова — Искусство Веб-разработки 🛸
Рет қаралды 17 М.
The Dangers Of Promise.all()
6:15
Theo - t3․gg
Рет қаралды 67 М.
Node.js is a serious thing now… (2023)
8:18
Code With Ryan
Рет қаралды 642 М.
JavaScript Visualized - Promise Execution
8:42
Lydia Hallie
Рет қаралды 147 М.
All useEffect Mistakes Every Junior React Developer Makes
22:23
OMG what happened??😳 filaretiki family✨ #social
01:00
Filaretiki
Рет қаралды 13 МЛН