mirror of
https://github.com/facebook/react-native.git
synced 2025-11-01 09:14:26 +00:00
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:
committed by
meta-codesync[bot]
parent
1a02e8bffe
commit
e2c803435c
@@ -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;
|
||||
|
||||
-1
@@ -128,7 +128,6 @@ void TurboModuleBinding::install(
|
||||
return;
|
||||
}
|
||||
|
||||
defineReadOnlyGlobal(runtime, "RN$UnifiedNativeModuleProxy", true);
|
||||
defineReadOnlyGlobal(
|
||||
runtime,
|
||||
"nativeModuleProxy",
|
||||
|
||||
Reference in New Issue
Block a user