next.js
1bccd951 - Render complete HTML documents after MPA Server Actions (#100740)

Commit
13 days ago
Render complete HTML documents after MPA Server Actions (#100740) MPA form submissions to Cache Components pages could return only the continuation of a prerender. The action executed, but the response omitted the HTML document and did not render the returned `useActionState` value. This change renders a complete document for MPA form submissions while retaining the RDC supplied by the prerender. This preserves ordinary `'use cache'` values on deployments where the default handler has no prerendered entries in memory. The action handler also prepares the render phase for MPA form submissions that do not revalidate data. Ordinary not-found responses include the root layout. The diagnosis and reproduction in #99981 identified the self-hosted case. This fix also handles postponed state supplied by Vercel before the action body, without changing how that body is decoded. The tests cover plain and stateful forms, both postponed-state variants, submission before hydration, cache reuse, invalidation, blocking routes, and ordinary and global not-found responses. Fixes #99756 Closes #99981
Author
Parents
Loading