c++: Simplify native module lookup (#54227)

Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/54227

All these flags were introduced for rollout purposes. We no longer need them. Let's get rid of them

Changelog: [Internal]

Reviewed By: christophpurrer

Differential Revision: D85171189

fbshipit-source-id: 4bd0531dfc3a9841fbe7db9a8f80329e04896e08
This commit is contained in:
Ramanpreet Nara
2025-10-21 15:05:35 -07:00
committed by meta-codesync[bot]
parent 1a02e8bffe
commit e2c803435c
2 changed files with 3 additions and 10 deletions
@@ -24,15 +24,9 @@ function requireModule<T: TurboModule>(name: string): ?T {
}
}
if (
global.RN$Bridgeless !== true ||
global.RN$TurboInterop === true ||
global.RN$UnifiedNativeModuleProxy === true
) {
const legacyModule: ?T = NativeModules[name];
if (legacyModule != null) {
return legacyModule;
}
const legacyModule: ?T = NativeModules[name];
if (legacyModule != null) {
return legacyModule;
}
return null;
@@ -128,7 +128,6 @@ void TurboModuleBinding::install(
return;
}
defineReadOnlyGlobal(runtime, "RN$UnifiedNativeModuleProxy", true);
defineReadOnlyGlobal(
runtime,
"nativeModuleProxy",