next.js
20785a2c - Move slow-page delay from middleware into the page render

Commit
138 days ago
Move slow-page delay from middleware into the page render With the delay in the page (and no Suspense boundary above it), React holds each navigation's commit until the render resolves, but the RSC response's first rows still deliver the router tree fast — so each click's navigate action settles in the queue before the next click lands, and none is discarded. The clicks race at the React level instead: older transitions can genuinely commit (as real history entries) before the newest one, and which of them do is a scheduling detail. The test now asserts the lifecycle's actual guarantee — exactly one terminal event per start, the newest transition commits, every abort names a real commit, commits in start order — instead of a fixed 1-commit/2-abort shape. (That deterministic queue-level replacement race remains covered by the same-tick triple-push test.)
Author
Jude Gao
Committer
Parents
Loading