Exp 06 — a Suspension

This page arrived in pieces.

The header above this line reached your browser before the two readings below it existed. Each one is an async Server component, and the Walk stopped at each of them — which is the only thing that can make a chunk boundary observable, because a synchronous render cannot stream at all.

The response committed at the first stop. Its status line was chosen there and cannot change afterwards, so a page that discovers a missing resource after an await renders sensible content at 200 rather than signalling it in the status. That is the price of streaming and it is paid here.

No placeholder was written for either reading. An async component blocks in order, so the second reading's markup follows the first's and nothing is patched out later.

Each reading prints the path it was rendered for, and it reads that path after its await — from a continuation this Worker's request handler had already returned from. The Request context is ambient, so it survives that.

Live specimen — async.server.tsx

First reading
240 ms · /async
Second reading
240 ms · /async

Resumability is unaffected by any of it. The counter below is a Client root on a streamed document: its record reached the payload at the close of the body, which is after every Suspension had settled, and its Address names the same node it would on a buffered page.

Live specimen — counter.client.tsx, on a streamed page