Pebbling Club 🐧🪨

  • Back to Basics: Running Promises in Serial with Array.reduce()
    Notes
    const tasks = getTaskArray();return tasks.reduce((promiseChain, currentTask) => { return promiseChain.then(chainResults => currentTask.then(currentResult => [ ...chainResults, currentResult ] ) );}, Promise.resolve([])).then(arrayOfResults => { // Do something with all results});
    Unfurl
  • ES6 Promises in Depth
    Notes
    Promises are a very involved paradigm, so we’ll take it slow.
    Feed
    Unfurl