Skip to content

Document missing react-dom server rendering and hydration options - #8632

Merged
eps1lon merged 2 commits into
reactjs:mainfrom
eps1lon:sebbie/fizz-server-options
Sep 3, 2026
Merged

Document missing react-dom server rendering and hydration options#8632
eps1lon merged 2 commits into
reactjs:mainfrom
eps1lon:sebbie/fizz-server-options

Conversation

@eps1lon

@eps1lon eps1lon commented Sep 2, 2026

Copy link
Copy Markdown
Member

This documents the formState option across the server rendering and hydration reference pages, and fills in other stable SSR options that were never documented.

hydrateRoot gains formState, which carries the form state produced by a Server Function form submission so that useActionState with a permalink returns the submitted state during hydration instead of the initial state. renderToPipeableStream and renderToReadableStream gain formState (the matching server side), importMap, onHeaders, and maxHeadersLength, and the object form of nonce for separate script and style nonces. prerender and prerenderToNodeStream gain importMap, onHeaders, and maxHeadersLength. The resumeAndPrerender entries on the react-dom/static index were marked as experimental-only even though they ship in stable releases, so the badge is removed, and the resumeAndPrerender intro destructured a postpone property that is actually called postponed.

The resumeToPipeableStream page no longer documents a signal option because the Node.js implementation neither types nor reads it, and it now documents the onAllReady callback that the implementation does support. The same page referred to resume in its intro and Returns section where it meant resumeToPipeableStream, and the react-dom/server index linked both resume entries to the renderToPipeableStream page; they now point at their own pages.

This adds the `formState`, `importMap`, `onHeaders`, and `maxHeadersLength` options to the `renderToPipeableStream` and `renderToReadableStream` reference pages, documents the object form of `nonce` for separate script and style nonces, and adds `importMap`, `onHeaders`, and `maxHeadersLength` to the `prerender` and `prerenderToNodeStream` pages. All of these options are supported in stable releases but were never documented. The `resumeAndPrerender` entries on the `react-dom/static` index were marked as experimental-only even though they ship in stable releases, so the badge is removed, and the `resumeAndPrerender` intro destructured a `postpone` property that is actually called `postponed`.

The `resumeToPipeableStream` page no longer documents a `signal` option because the Node.js implementation neither types nor reads it, and it now documents the `onAllReady` callback that the implementation does support. The same page referred to `resume` in its intro and Returns section where it meant `resumeToPipeableStream`, and the `react-dom/server` index linked both resume entries to the `renderToPipeableStream` page; they now point at their own pages.

Co-Authored-By: Claude Code (kimi-k3[1m]) <noreply@anthropic.com>
@github-actions

github-actions Bot commented Sep 2, 2026

Copy link
Copy Markdown

Size changes

Details

📦 Next.js Bundle Analysis for react-dev

This analysis was generated by the Next.js Bundle Analysis action. 🤖

This PR introduced no changes to the JavaScript bundle! 🙌

@eps1lon eps1lon changed the title Document missing Fizz server rendering options and fix resume references Document missing server rendering options and fix resume references Sep 2, 2026
@eps1lon
eps1lon marked this pull request as ready for review September 2, 2026 18:39
@eps1lon
eps1lon requested review from acdlite and gnoff September 2, 2026 18:39
This adds the `formState` option to the `hydrateRoot` reference. The option carries the form state produced by a Server Function form submission so that `useActionState` with a `permalink` returns the submitted state during hydration instead of the initial state, and it must match the `formState` passed to the server renderer. The option shipped in React 19.0 but was never documented.

Co-Authored-By: Claude Code (kimi-k3[1m]) <noreply@anthropic.com>
@eps1lon eps1lon changed the title Document missing server rendering options and fix resume references Document missing react-dom server rendering and hydration options Sep 2, 2026
@eps1lon
eps1lon merged commit f3d9794 into reactjs:main Sep 3, 2026
5 checks passed
@eps1lon
eps1lon deleted the sebbie/fizz-server-options branch September 3, 2026 08:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant