Repository navigation
Commit 01d26a8
Sync OSS Fabric renderer (#60470)
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: D1356146301 parent 7c1e281 commit 01d26a8
5 files changed
Lines changed: 30154 additions & 34064 deletions
File tree
- packages/react-native
- Libraries/Renderer
- implementations
- shims
0 commit comments