Effective Spinners with the Promise finally Method
HTML-код
- Опубликовано: 10 сен 2024
- This tutorial shows some best practices on how to work with Spinners and Loaders using the Promise.finally method to make sure that you have proper removal of your spinner after fetching the data, while still ensuring animated content loading for your users.
Code from video: gist.github.co...
You are doing great work Steve! Please do not stop! You are the person who explained me what Async means. I love your content! Thanks so much for your effort. I wish, one day, you would have 1million subscribers! Then I will be first person that more happier than anyone else!
This is super useful and happens too often. Nice one!
The dulcet tones of JavaScript
Very interesting. It does look much better rendering lists this way! Also I had no idea that I could place await in front of a for loop.
It is a relatively new type of for loop - for await of. - developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/for-await...of
ruclips.net/video/unDSLi5zBXU/видео.html
@@SteveGriffith-Prof3ssorSt3v3 aha, so it's a new kind of loop. Thank you!
@@SteveGriffith-Prof3ssorSt3v3 about 3 years ago. How did I miss it!
Excellent piece, thank u
Wouldn't this piece of code break if the array length is 0? So it's 2000/0?
It would. So you should wrap it in an if statement that will be displaying a message to the user about lack of data and only doing the calculation if there is data in the array.
bro i love your content but this entire video could've been a 30 second short
Not for students who are new to Promises or the other concepts.
Anything can be a 30 second video to an experienced developer. Or you can just download the code.
I encourage my students to speed up the play speed as they feel comfortable.
a thing you hear in 30sec you forget in 5sec
stay away from creators who teach like "Learn this programming language" in 30mins". cause that is a scam.