$ the-wire · showcase
React Native sweeps out bridgeless flags and legacy modules, React inlines enableFragmentRefs
By RepoJournal · Filed · About Meta · Composed from the cited sources · methodology
React Native removed the last configuration toggles that could only ever hold one value while deleting legacy RCTTimingModule and RCTNativeAnimatedModule, and React inlined the enableFragmentRefs flag now that it is enabled in every channel.
React Native's New Architecture cleanup landed in force. `bridgelessEnabled` is gone from both `DefaultNewArchitectureEntryPoint` and `RCTRootViewFactoryConfiguration`, because bridgeless is the only supported mode: every `load(...)` path passed `true` and `isConfigurationValid` raised an error when it was `false` [1]. On iOS the equivalent surface was already deprecated and hardcoded, with the property assigned `YES` in every initializer and the two deprecated initializers ignoring the argument [2]. If you set that flag today, this is a breaking change and the setting must go.
On the module side, `+moduleName` is now optional on `RCTBridgeModule` instead of required, so a TurboModule resolved via a module provider need not declare it [3]. The stated goal is that New Arch modules can drop `RCT_EXPORT_MODULE` when only the New Architecture is supported, and the changelog marks it `[iOS][Breaking]`. Two legacy modules are also gone: `RCTTimingModule` [4] and `RCTNativeAnimatedModule`, the latter unreachable since the Old Architecture was deleted from RN iOS and `ReactInstance.cpp` sets `RN$Bridgeless = true` unconditionally [5].
In React, the `enableFragmentRefs` flag was inlined and removed from `ReactFeatureFlags` and all of its forks, since it is enabled in every channel [6]. The mechanical part of the diff required care: several `case Fragment:` blocks in `ReactFiberCommitWork` had a `// Fallthrough` only reachable with the flag off, and where a preceding `ViewTransitionComponent` case falls into `Fragment` the author verified behavior is unchanged [7]. A test also landed asserting client-rendered content for a rejected lazy element [8].
Action items
- → Remove any `bridgelessEnabled` assignments from your New Architecture entry point and root view factory configuration facebook/react-native [immediate]
- → Audit iOS TurboModules that rely on `+moduleName` being declared before dropping `RCT_EXPORT_MODULE` facebook/react-native [plan]
- → Drop references to RCTTimingModule and RCTNativeAnimatedModule in iOS builds facebook/react-native [plan]
References
- [1] Remove `bridgelessEnabled` from `DefaultNewArchitectureEntryPoint` (#58415) ↗ facebook/react-native
- [2] Remove `bridgelessEnabled` from `RCTRootViewFactoryConfiguration` (#58416) ↗ facebook/react-native
- [3] Make `+moduleName` optional so New Arch modules can drop `RCT_EXPORT_MODULE` WIP (#58417) ↗ facebook/react-native
- [4] Remove legacy RCTTimingModule (#57037) ↗ facebook/react-native
- [5] Delete legacy RCTNativeAnimatedModule from RN iOS (#57904) ↗ facebook/react-native
- [6] [flags] Cleanup enableFragmentRefs feature flag ↗ facebook/react
- [7] [flags] Cleanup enableFragmentRefs feature flag (#37573) ↗ facebook/react
- [8] [test] Assert client-rendered content for a rejected lazy element (#37213) ↗ facebook/react