Promise.allSettled and its own implementation/Polyfill. Asked in Amazon|Microsoft

Опубликовано: 13 Январь 2022
на канале: TechStorming
1,209
29

The Promise.allSettled() method returns a promise that resolves after all of the given promises have either fulfilled or rejected, with an array of objects that each describes the outcome of each promise.
It is typically used when you have multiple asynchronous tasks that are not dependent on one another to complete successfully, or you'd always like to know the result of each promise.

In comparison, the Promise returned by Promise.all() may be more appropriate if the tasks are dependent on each other / if you'd like to immediately reject upon any of them rejecting.

Linkedin:   / manish-mohan-profile  
GitHub code Link: https://github.com/mohanmanis/tutorials


00:00 introduction
00:35 Definition of Promise.allSettled
01:55 Example of Promise.allSettled
08:33 Polyfill of Promise.allSettled


Смотрите видео Promise.allSettled and its own implementation/Polyfill. Asked in Amazon|Microsoft онлайн без регистрации, длительностью часов минут секунд в хорошем качестве. Это видео добавил пользователь TechStorming 13 Январь 2022, не забудьте поделиться им ссылкой с друзьями и знакомыми, на нашем сайте его посмотрели 1,20 раз и оно понравилось 2 людям.