Whether you're a beginner or an experienced developer, you might be making some common mistakes with .finally(). This video will guide you through what .finally() is, when to use it, and why it's crucial to understand its role in promise handling for effective code cleanup.
Don't forget to subscribe and hit the bell icon for more coding tips from a hands-on tech lead.
What You Will Learn:
What .finally() is and how it differs from .then() and .catch().
Practical examples of using .finally() in real-world coding scenarios.
Common errors programmers make with .finally() and how to avoid them.
BLOG
https://selvinortiz.com
EMAIL
heyselvin@gmail.com
CHAPTERS
00:00 - Intro
00:26 - Diving into the code
00:51 - Explaining the request delay
01:05 - Using setTimeout() to fake request
01:46 - Using promise.resolve()
02:24 - Using promise.reject()
02:40 - Unhandled promise rejection
03:23 - Quick review or promises
03:39 - Making success/fail random
04:29 - Reviewing then, catch, finally
05:07 - Adding UI state dummies
06:17 - Introducing finally()
06:47 - Common pitfalls with finally
07:21 - Pitfalls in action
08:50 - Don't do this
09:33 - Outro
On this page of the site you can watch the video online Are You Using Javascript Promises All Wrong? with a duration of hours minute second in good quality, which was uploaded by the user Selvin Ortiz 19 April 2024, share the link with friends and acquaintances, this video has already been watched 59 times on youtube and it was liked by 3 viewers. Enjoy your viewing!