This is another way of promise by fetch through resolve and reject, Really learn it deeply again, Thank you Dear Teacher Mr. Steve
@CodingNuggets3 жыл бұрын
Love seeing the different ways that code can be written to accomplish the same thing. I've never written my fetch calls the normal way. I've got my own syntax liking and only change if the codebase is already using a different syntax across the entire code base. I like your thinking on this. Thanks Steve. See you soon!
@CodingNuggets3 жыл бұрын
Nope, don't give a ... because you all continue to post this on so many different videos in the comments that everyone can see through your crap. Just saying.
@rmnkot3 жыл бұрын
You made me rethink fetching paradigm I used previously. Thanks a lot!!
@RahulGupta-qo7fi3 жыл бұрын
Accidentally got your channel and loved it. I needed in depth knowledge and it is all provided on your videos .
@SteveGriffith-Prof3ssorSt3v33 жыл бұрын
I hope a lot of others accidentally discover my channel too! :)
@RahulGupta-qo7fi3 жыл бұрын
Nowadays, Due to a lot tech channels ,it is become hard to know which channels r good. I hope u get more subscribers ASAP, actually you deserve a lot .....
@joaovaz34733 жыл бұрын
Wow, didn't know that! Really useful. Thanks a bunch for another great video
@antoniosalzano52533 жыл бұрын
i didn't understand the difference between .catch(err => ...) and the {}, err => ...
@SteveGriffith-Prof3ssorSt3v33 жыл бұрын
The catch( ) handles any error that happens at any point in the chain. Adding the (err)=>{ } inside a then will capture it so it doesn't get sent to the catch( ). Let's us decide what to do depending on the stage and type of failure.
@costagmc12 жыл бұрын
Great explanation ..
@Timoteo19963 жыл бұрын
As a new developer, I’ve always kind of thought that .then was considered somewhat obsolete compared to async await. Obviously I’m wrong but how would I know when to use .then vs async await? Is there a rule of thumb?
@SteveGriffith-Prof3ssorSt3v33 жыл бұрын
Then( ) will always work dependably. Async - await is something that can be helpful at times but you never have to use it. If you have a series of things to do then using a chain of then( ) methods makes the most sense. If you are working with a single promise or a single result then you can choose to use await if you want. Then is not obsolete it is a core part of how promises work. I think async await gained a lot of popularity because it let people who weren't yet comfortable with how promises work make their code look like it did before promises and seem to run synchronously.
@Timoteo19963 жыл бұрын
@@SteveGriffith-Prof3ssorSt3v3 thank you!
@pujandhy2 жыл бұрын
Subscribed and liked. 😀
@saadowain35113 жыл бұрын
Please add it to ajax list.. still watching them
@SteveGriffith-Prof3ssorSt3v33 жыл бұрын
It's there.
@MichaelSalo3 жыл бұрын
I guess I don't see the advantage here. The double then callbacks are a little less clear, and a little more mistake prone, than straightforward then and catch blocks.