4

My current rant: Recursive promise chains in JS. That's all.

Comments
  • 4
    Just write callbacks to check for the promise using try and catch. Repeat this for every promise of the chain. Profit.
  • 2
    @iusearchbtw mixing promises and callbacks makes me feels naughty :D Anyways I took a different approach that led to more performant execution too.

    This is something I'd like to wrap my head around one day though.
  • 2
    @ananaszjoe This was meant to be taken ironically, I should have been more specific. I have really bad experiences with mixing callbacks and promises, thus I'd prefer anything.
  • 6
    Use async and await
  • 1
    @devTea I was going to say that if no comment would've

    async await is GREAAT
  • 1
    Yep, async await is beautiful. I don't see how one can survive using the callback promise syntax.
Add Comment