Skip to content

[pull] main from react:main - #631

Merged
pull[bot] merged 1 commit into
code:mainfrom
react:main
Aug 8, 2026
Merged

[pull] main from react:main#631
pull[bot] merged 1 commit into
code:mainfrom
react:main

Conversation

@pull

@pull pull Bot commented Aug 8, 2026

Copy link
Copy Markdown

See Commits and Changes for more details.


Created by pull[bot] (v2.0.0-alpha.4)

Can you help keep this open source service alive? 💖 Please sponsor : )

Adds a new Fizz option, `onBrowserBailout`, for observing intentional
server-render bailouts caused by `ReactDOM.browser()` and future APIs
that use the same recoverable error mechanism. The callback receives the
original recoverable error and `ErrorInfo`, defaults to a noop, and runs
only when Fizz successfully recovers by deferring work to the browser.

Recoverables consumed within Suspense or used to abort recoverable
boundaries are reported through `onBrowserBailout` without also invoking
`onError`. A bailout outside Suspense remains fatal and reports only
through `onError`, with the original recoverable preserved as its cause,
while directly throwing the value continues to behave like a normal
render error.

Plumbs the option through the streaming, resume, and prerender entry
points for Node, browser, Edge, Bun, FB, markup, and noop renderers
while preserving the positional Fizz request API for callers that do not
expose the option.

Uses an environment-neutral browser-only rendering message for the
isomorphic `browser()` value and updates the production error mapping.
Tests cover successful browser bailouts, recoverable abort reasons,
root-fatal behavior, component stack information, the default noop
behavior, and direct throws in development and production.
@pull pull Bot locked and limited conversation to collaborators Aug 8, 2026
@pull pull Bot added the ⤵️ pull label Aug 8, 2026
@pull
pull Bot merged commit 2042572 into code:main Aug 8, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant