Abort A Promise In Javascript (Promise.Race + Timeout) #javascript #javascriptlearning #webdev

preview_player
Показать описание


📣 Follow Coding in Flow on social media:
Рекомендации по теме
Комментарии
Автор

Hey there! I really love the font you're using in VS Code in this video. Would you mind sharing the name of the font? Thanks!

arpan
Автор

Does cancelling the promisse affects the backend at all? If the long running promise was a post call to create an entry on the database, would the entry still be created after a long time, or would the backend stop?

ricardopompilio
Автор

This is the same misunderstanding that Joshua made a couple months ago.
Using timeout function to abort a promise is a serious mistake. Make a code that will abort fetch with AbortController signal instead.

풍월상신
Автор

What made you start learning react?? Is it worth it to learn web development when u have the most experience in android native?

roushanali
Автор

It does not work properly, because in this case you use two timeouts. Try long running task make a while with incrementing to the and return Promise.resolve with it

sergiiPatokha
welcome to shbcf.ru