$ the-wire · showcase
React compiler gains captured-variable updates, Meta trims New Architecture flags
By RepoJournal · Filed · About Meta · Composed from the cited sources · methodology
React's compiler now handles prefix and postfix update expressions on captured variables in both the TypeScript and Rust backends, while React Native removed dead New Architecture configuration and fixed a data race in RCTAccessibilityManager.
The React compiler learned to support prefix and postfix update expressions on captured variables, in both the TypeScript and Rust compiler backends [1]. Updates are represented with explicit `PrefixUpdateLocal`, `PrefixUpdateContext`, `PostfixUpdateLocal`, and `PostfixUpdateContext` HIR variants, and captured updates are modeled as mutations so SSA, effect inference, dead-code elimination, and post-render validation preserve their semantics [1]. The change converts existing TODO fixtures to passing coverage and adds the Airwave-shaped map regression, meaning code that previously failed or was skipped in those paths now compiles.
React Native reduced `DefaultNewArchitectureEntryPoint` to the single setting it still selects: the release level [2]. TurboModules, Fabric, and bridgeless are all unconditionally enabled in the New Architecture, so `fabricEnabled`, `turboModulesEnabled`, and the other remaining flags were dead configuration [2]. The same change removes the deprecated parameterized `load(...)` overloads, so callers passing those parameters will no longer compile against this API. This is a breaking change: code that set the removed flags or called the parameterized `load(...)` overloads must drop them.
Two fixes target correctness on the DOM and Android sides. `FragmentInstance.compareDocumentPosition(document)` used to throw a TypeError because `Document.ownerDocument` is `null` and the CONTAINS fiber-validation fallback read `ownerDocument.documentElement` unconditionally; a `Document` node is now treated as its own owner document [3]. On Android 15+ (API 35), apps targeting API 35+ get bounds-based line breaking in every `TextView` by default via the platform compat change `TextView#USE_BOUNDS_FOR_WIDTH`; ReactTextView's line breaking is kept advance-based so the last line is not clipped [4].
React Native also hardened `PerformanceObserver.observe()` option validation so invalid configurations fail deterministically before a native observer is registered [5]. Calling `observe()` with no options now throws the expected argument error instead of destructuring `undefined`, and the `entryTypes`/`type` validation messages now match the actual invalid condition [5]. Separately, `RCTAccessibilityManager` exported methods ran on the JS thread despite mirroring UIKit accessibility state into non-atomic ivars from nine NSNotificationCenter handlers delivered on the main thread [6]. Its methods now run on the main queue, closing off a data race on the content size multipliers [6].
Action items
- → Audit uses of `DefaultNewArchitectureEntryPoint`: drop `fabricEnabled`, `turboModulesEnabled`, and the parameterized `load(...)` overloads before upgrading react-native facebook/react-native [plan]
- → Verify last-line text rendering on Android 15+ (API 35) with app targeting API 35+ to confirm the advance-based fix lands facebook/react-native [monitor]
- → Re-run compiler fixtures that exercised captured-variable updates now that the TODO cases pass facebook/react [monitor]
References
- [1] [compiler] Support update expressions on captured variables ↗ facebook/react
- [2] Keep only release level on DefaultNewArchitectureEntryPoint (#58469) ↗ facebook/react-native
- [3] [DOM] Fix Fragment compareDocumentPosition(document) TypeError (#37579) ↗ facebook/react
- [4] fix(android): keep ReactTextView line breaking advance-based on Android 15+ so the last line is not clipped (#58280) ↗ facebook/react-native
- [5] fix: validate PerformanceObserver observe options ↗ facebook/react-native
- [6] Run RCTAccessibilityManager methods on the main queue (#58476) ↗ facebook/react-native