And .then() what? Promise programming patterns
summary
Financial Times’ mobile app migrates from callbacks to Promises, reporting simpler, more reliable, faster code via better parallelization. Implements a cache that stores the in-flight promise to avoid the thundering herd, a serial queue by keeping a tail promise and using Promise.resolve to start chains, and reusable “ready” promises for init steps so late listeners never miss events. Uses Promise.all for parallel map calls, reduce for sequential processing, and adds a nonstandard finally helper; async/await syntax is already supported in Edge.
AI-written summary · about
