Promises: Error Handling, Aborts, and Helper Methods - Part 2

Поділитися
Вставка
  • Опубліковано 12 вер 2024

КОМЕНТАРІ • 13

  • @JohnFarrellDev
    @JohnFarrellDev 3 місяці тому +2

    Great as always.
    I know you want to keep the show effective for audio only but some code examples on the screen would be really helpful.

    • @syntaxfm
      @syntaxfm  3 місяці тому

      We have a few recorded all ready with code on screen. Def something we'll be doing much more in the future

  • @wesleycoder
    @wesleycoder 3 місяці тому +7

    Promise.race is useful for hitting both an external API and a cache, you trigger both and wait for the fastest successful response.

    • @Drnken
      @Drnken 3 місяці тому +2

      makes so much sense lol thank you for that

  • @rafaelrocha3991
    @rafaelrocha3991 3 місяці тому

    Another example usage of Promise.race would be for a large scale system with some sort of redundant services you want data and you know you can get it from multiple points so you do multiple fetches resolving to the same mapper from different sources.

  • @Stoney_Eagle
    @Stoney_Eagle 3 місяці тому

    Promise {} 😊

  • @abdellahcodes
    @abdellahcodes 3 місяці тому

    Sentry swag drop when?!!

  • @ValorousReaper
    @ValorousReaper 3 місяці тому

    Promise.race in a sorta Family Feud game with webhooks. First player to hit their button gets to answer.