Feb 23, 2017 · 1 min read
Your use of memoize and Promise.all indicates that JavaScript, as it stands, is missing some syntax and/or APIs, since your use case — two parallel branches, one of them containing two sequential tasks — seems simple enough, and yet, the combination of promises and awaits (your least favorite solution) isn’t optimal. Maybe we need a syntax/API proposal to enable a more intuitive pattern for this use case.
