liveBook · Manning

Promise chain

A promise chain is a sequence of linked promise reactions in which each step receives the preceding step’s fulfillment value or handles its rejection.

How 2 Manning books explain it

The Joy of JavaScript

A promise chain is a sequence of linked Promise reactions in which each step receives the result or failure of the previous step.

How it is used
Structures linear asynchronous flows as composable, forward-moving data transformations.
How deep it goes
Explains linking, settlement, nested-promise flattening, broken chains, error recovery, and finally, with runnable snippets.
Examples
Uses string transformations, nested promises, thrown errors, default recovery values, unhandled rejection warnings, and finally.
What you can do after
Builds linear Promise workflows, preserves nested results and failures, and diagnoses accidental disjoint chains.

Read how The Joy of JavaScript explains promise chain →

Get Programming with JavaScript Next: New features of ECMAScript 2015, 2016, and beyond

A sequence of linked promise operations in which the outcome of one promise feeds subsequent handlers.

How it is used
Coordinates dependent asynchronous operations and handles their errors as a single flow.
How deep it goes
Works through a repeating image chain, its memory leak, and rejection propagation; stops short of broader promise internals.
Examples
Uses a random-image workflow that fetches, fades, pauses, and repeats, with a catch that restarts on failure.
What you can do after
Understand how linked handlers carry outcomes and rejections, and how to prevent a repeating workflow from extending one chain indefinitely.

Read how Get Programming with JavaScript Next: New features of ECMAScript 2015, 2016, and beyond explains promise chain →

Related concepts

These guides are generated from the text of Manning books by Manning's knowledge graph and link to the sections they draw on. The full books are available on liveBook and at manning.com.