Skip to content

Sync OSS Fabric renderer (#60470) - #60470

Open
rubennorte wants to merge 3 commits into
react:mainfrom
rubennorte:export-D135614630
Open

rubennorte wants to merge 3 commits into
react:mainfrom
rubennorte:export-D135614630

Conversation

@rubennorte

@rubennorte rubennorte commented Dec 2, 2026 •

Copy link
Copy Markdown
Member

Summary:

Context

The Fabric source now includes flushSync, but the generated OSS renderer bundles must be refreshed before the new export is available to React Native.

Changes

Sync ReactFabric-dev.js, ReactFabric-prod.js, and ReactFabric-profiling.js from React commit 7d301100cea02e3232f92f180fb6853191d0d16d, using the stable-channel RN_OSS_DEV, RN_OSS_PROD, and RN_OSS_PROFILING build outputs. Apply the standard generated header and SignedSource signatures. Leave the renderer revision, dependencies, shims, and internal bundles unchanged.

Major renderer changes

Compared with the previous OSS bundles from React revision dc9aed364252a34966f4f2c4a98272317fdddb60, this refresh includes more than the new flushSync export:

  • Remove the legacy event-dispatching pipeline, including its synthetic-event pooling, event-plugin registry, responder plugin, and touch-history implementation. Native events use the modern dispatching pipeline maintained in React Native instead.
  • Remove legacy-root reconciliation and the disableLegacyMode flag. Fabric's render entry point now requires a concurrent root and rejects the unsupported legacy-root API.
  • Add flushSync to all three OSS Fabric exports, including transition/priority restoration and flushing pending synchronous work when the callback throws.

The large generated diff includes these substantive deletions as well as the resulting function reordering and temporary-variable renumbering by Closure Compiler; it is not a flushSync-only change.

Released React compatibility

Verified the shared-internals contract against the unmodified public npm packages react@19.3.0 (the pinned version) and react@19.3.1 (the current released latest), with released scheduler@0.28.0. The OSS bundles obtain shared internals from React.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE; no internal React build, replacement internals object, or special shared-internals global was supplied. Every shared-internals field accessed by each bundle exists in the corresponding released React development or production build, including H, A, T, S, and the required development-only fields.

All six released-React/renderer combinations passed runtime checks for hook dispatch, context, IDs, synchronous state commits, flushSync return values and throw-path flushing, transition opt-out/restoration, async startTransition, async useActionState, and unmounting. The development combinations also passed released React.act checks for actQueue, asyncTransitions, and thrownErrors; development and profiling combinations exercised profiler callbacks. React and Scheduler were not mocked or patched; only the native Fabric bridge was mocked, so these checks verify the JavaScript shared-internals contract rather than full native integration.

Changelog: [Internal]

Reviewed By: javache, christophpurrer

Differential Revision: D135614630

@meta-cla meta-cla Bot added the CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. label Dec 2, 2026
@facebook-github-tools facebook-github-tools Bot added p: Facebook Partner: Facebook Partner labels Dec 2, 2026
@meta-codesync

meta-codesync Bot commented Dec 2, 2026

Copy link
Copy Markdown

@rubennorte has exported this pull request. If you are a Meta employee, you can view the originating Diff in D135614630.

@christophpurrer christophpurrer left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Review automatically exported from Phabricator review in Meta.

@javache javache left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Review automatically exported from Phabricator review in Meta.

@meta-codesync meta-codesync Bot changed the title Sync OSS Fabric renderer Sync OSS Fabric renderer (#60470) Dec 2, 2026
rubennorte added a commit to rubennorte/react-native that referenced this pull request Dec 2, 2026
Summary:

## Context
The Fabric source now includes `flushSync`, but the generated OSS renderer bundles must be refreshed before the new export is available to React Native.

## Changes
Sync `ReactFabric-dev.js`, `ReactFabric-prod.js`, and `ReactFabric-profiling.js` from React commit `7d301100cea02e3232f92f180fb6853191d0d16d`, using the stable-channel `RN_OSS_DEV`, `RN_OSS_PROD`, and `RN_OSS_PROFILING` build outputs. Apply the standard generated header and SignedSource signatures. Leave the renderer revision, dependencies, shims, and internal bundles unchanged.

## Major renderer changes
Compared with the previous OSS bundles from React revision `dc9aed364252a34966f4f2c4a98272317fdddb60`, this refresh includes more than the new `flushSync` export:

- Remove the legacy event-dispatching pipeline, including its synthetic-event pooling, event-plugin registry, responder plugin, and touch-history implementation. Native events use the modern dispatching pipeline maintained in React Native instead.
- Remove legacy-root reconciliation and the `disableLegacyMode` flag. Fabric's `render` entry point now requires a concurrent root and rejects the unsupported legacy-root API.
- Add `flushSync` to all three OSS Fabric exports, including transition/priority restoration and flushing pending synchronous work when the callback throws.

The large generated diff includes these substantive deletions as well as the resulting function reordering and temporary-variable renumbering by Closure Compiler; it is not a `flushSync`-only change.

## Released React compatibility
Verified the shared-internals contract against the unmodified public npm packages `react@19.3.0` (the pinned version) and `react@19.3.1` (the current released latest), with released `scheduler@0.28.0`. The OSS bundles obtain shared internals from `React.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE`; no internal React build, replacement internals object, or special shared-internals global was supplied. Every shared-internals field accessed by each bundle exists in the corresponding released React development or production build, including `H`, `A`, `T`, `S`, and the required development-only fields.

All six released-React/renderer combinations passed runtime checks for hook dispatch, context, IDs, synchronous state commits, `flushSync` return values and throw-path flushing, transition opt-out/restoration, async `startTransition`, async `useActionState`, and unmounting. The development combinations also passed released `React.act` checks for `actQueue`, `asyncTransitions`, and `thrownErrors`; development and profiling combinations exercised profiler callbacks. React and Scheduler were not mocked or patched; only the native Fabric bridge was mocked, so these checks verify the JavaScript shared-internals contract rather than full native integration.

Changelog: [Internal]

Reviewed By: javache, christophpurrer

Differential Revision: D135614630
rubennorte added a commit to rubennorte/react-native that referenced this pull request Dec 2, 2026
Summary:

## Context
The Fabric source now includes `flushSync`, but the generated OSS renderer bundles must be refreshed before the new export is available to React Native.

## Changes
Sync `ReactFabric-dev.js`, `ReactFabric-prod.js`, and `ReactFabric-profiling.js` from React commit `7d301100cea02e3232f92f180fb6853191d0d16d`, using the stable-channel `RN_OSS_DEV`, `RN_OSS_PROD`, and `RN_OSS_PROFILING` build outputs. Apply the standard generated header and SignedSource signatures. Leave the renderer revision, dependencies, shims, and internal bundles unchanged.

## Major renderer changes
Compared with the previous OSS bundles from React revision `dc9aed364252a34966f4f2c4a98272317fdddb60`, this refresh includes more than the new `flushSync` export:

- Remove the legacy event-dispatching pipeline, including its synthetic-event pooling, event-plugin registry, responder plugin, and touch-history implementation. Native events use the modern dispatching pipeline maintained in React Native instead.
- Remove legacy-root reconciliation and the `disableLegacyMode` flag. Fabric's `render` entry point now requires a concurrent root and rejects the unsupported legacy-root API.
- Add `flushSync` to all three OSS Fabric exports, including transition/priority restoration and flushing pending synchronous work when the callback throws.

The large generated diff includes these substantive deletions as well as the resulting function reordering and temporary-variable renumbering by Closure Compiler; it is not a `flushSync`-only change.

## Released React compatibility
Verified the shared-internals contract against the unmodified public npm packages `react@19.3.0` (the pinned version) and `react@19.3.1` (the current released latest), with released `scheduler@0.28.0`. The OSS bundles obtain shared internals from `React.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE`; no internal React build, replacement internals object, or special shared-internals global was supplied. Every shared-internals field accessed by each bundle exists in the corresponding released React development or production build, including `H`, `A`, `T`, `S`, and the required development-only fields.

All six released-React/renderer combinations passed runtime checks for hook dispatch, context, IDs, synchronous state commits, `flushSync` return values and throw-path flushing, transition opt-out/restoration, async `startTransition`, async `useActionState`, and unmounting. The development combinations also passed released `React.act` checks for `actQueue`, `asyncTransitions`, and `thrownErrors`; development and profiling combinations exercised profiler callbacks. React and Scheduler were not mocked or patched; only the native Fabric bridge was mocked, so these checks verify the JavaScript shared-internals contract rather than full native integration.

Changelog: [Internal]

Reviewed By: javache, christophpurrer

Differential Revision: D135614630
@github-actions

github-actions Bot commented Dec 2, 2026

Copy link
Copy Markdown

Warning

JavaScript API change detected

This PR commits an update to ReactNativeApi.d.ts, indicating a change to React Native's public JavaScript API.

  • Please include a clear changelog message.
  • This change will be subject to additional review.

This change was flagged as: POTENTIALLY_BREAKING

Summary:

## Context
The public `findNodeHandle` export is a direct alias of `ReactFabric.findNodeHandle`. Its inferred `typeof` declaration pulls the whole private Fabric interface into the generated API snapshot, so internal renderer changes appear as changes to the public React Native API.

## Changes
Give the alias a self-contained projection of its existing method signature and regenerate the API snapshot without the private Fabric object and its supporting declarations. The projection preserves the type generator's existing method-level nullable-to-undefined convention; a standalone function annotation would otherwise change the generated public nullability. Keep the runtime alias unchanged and preserve the public call signature.

Changelog: [Internal]

Reviewed By: javache

Differential Revision: D135632950
Summary:
This just adds the definition of flushSync to the generated types, but the actual implementation will land in a different PR shortly.

Changelog: [internal]

Reviewed By: javache

Differential Revision: D135611937
Summary:

## Context
The Fabric source now includes `flushSync`, but the generated OSS renderer bundles must be refreshed before the new export is available to React Native.

## Changes
Sync `ReactFabric-dev.js`, `ReactFabric-prod.js`, and `ReactFabric-profiling.js` from React commit `7d301100cea02e3232f92f180fb6853191d0d16d`, using the stable-channel `RN_OSS_DEV`, `RN_OSS_PROD`, and `RN_OSS_PROFILING` build outputs. Apply the standard generated header and SignedSource signatures. Leave the renderer revision, dependencies, shims, and internal bundles unchanged.

## Major renderer changes
Compared with the previous OSS bundles from React revision `dc9aed364252a34966f4f2c4a98272317fdddb60`, this refresh includes more than the new `flushSync` export:

- Remove the legacy event-dispatching pipeline, including its synthetic-event pooling, event-plugin registry, responder plugin, and touch-history implementation. Native events use the modern dispatching pipeline maintained in React Native instead.
- Remove legacy-root reconciliation and the `disableLegacyMode` flag. Fabric's `render` entry point now requires a concurrent root and rejects the unsupported legacy-root API.
- Add `flushSync` to all three OSS Fabric exports, including transition/priority restoration and flushing pending synchronous work when the callback throws.

The large generated diff includes these substantive deletions as well as the resulting function reordering and temporary-variable renumbering by Closure Compiler; it is not a `flushSync`-only change.

## Released React compatibility
Verified the shared-internals contract against the unmodified public npm packages `react@19.3.0` (the pinned version) and `react@19.3.1` (the current released latest), with released `scheduler@0.28.0`. The OSS bundles obtain shared internals from `React.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE`; no internal React build, replacement internals object, or special shared-internals global was supplied. Every shared-internals field accessed by each bundle exists in the corresponding released React development or production build, including `H`, `A`, `T`, `S`, and the required development-only fields.

All six released-React/renderer combinations passed runtime checks for hook dispatch, context, IDs, synchronous state commits, `flushSync` return values and throw-path flushing, transition opt-out/restoration, async `startTransition`, async `useActionState`, and unmounting. The development combinations also passed released `React.act` checks for `actQueue`, `asyncTransitions`, and `thrownErrors`; development and profiling combinations exercised profiler callbacks. React and Scheduler were not mocked or patched; only the native Fabric bridge was mocked, so these checks verify the JavaScript shared-internals contract rather than full native integration.

Changelog: [Internal]

Reviewed By: javache, christophpurrer

Differential Revision: D135614630

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. meta-exported p: Facebook Partner: Facebook Partner

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants