Skip to content

Document the object form of nonce for resume and resumeToPipeableStream - #8725

Open
hsusul wants to merge 1 commit into
reactjs:mainfrom
hsusul:docs/resume-nonce-object
Open

hsusul wants to merge 1 commit into
reactjs:mainfrom
hsusul:docs/resume-nonce-object

Conversation

@hsusul

@hsusul hsusul commented Nov 1, 2026

Copy link
Copy Markdown

Why

The resume pages describe nonce only as a string for script-src. React types that option as NonceOption, a string or an object with optional script and style properties. resumeToPipeableStream takes ResumeOptions, whose nonce field is NonceOption. Node, browser, and edge resume use that same nonce type. Those types live in packages/react-dom/src/server/ReactDOMFizzServerNode.js, with the same nonce field on the browser and edge server files.

What changed

  • The nonce entries on resume and resumeToPipeableStream include the object-form sentence already on the render pages.

Scope

  • Covers the nonce description on the two resume reference pages.
  • Leaves the render pages, the prerender caveat, and runtime code unchanged.

Blast Radius

Readers of the two resume pages can see that nonce accepts an object with script and style properties. The sentence matches the render pages. The diff adds no links, headings, or code.

Verification

  • prettier --check on resume.md and resumeToPipeableStream.md passed. .prettierignore excludes those markdown files. Prettier with that ignore disabled also fails on these pages at origin/main, so the existing formatting stays.
  • eslint on the two files passed, and node scripts/headingIdLinter.js on the two files passed.
  • git diff origin/main...HEAD changes two prose lines. This PR does not include a yarn build.

@github-actions

github-actions Bot commented Nov 1, 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! 🙌

This branch was successfully deployed

1 active deployment
Preview — d8f49439 Deployed Nov 1, 2026 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant