Skip to content

Commit e2c8034

Browse files
RSNarameta-codesync[bot]
authored andcommitted
c++: Simplify native module lookup (facebook#54227)
Summary: Pull Request resolved: facebook#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
1 parent 1a02e8b commit e2c8034

File tree

2 files changed

+3
-10
lines changed

2 files changed

+3
-10
lines changed

packages/react-native/Libraries/TurboModule/TurboModuleRegistry.js

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -24,15 +24,9 @@ function requireModule<T: TurboModule>(name: string): ?T {
2424
}
2525
}
2626

27-
if (
28-
global.RN$Bridgeless !== true ||
29-
global.RN$TurboInterop === true ||
30-
global.RN$UnifiedNativeModuleProxy === true
31-
) {
32-
const legacyModule: ?T = NativeModules[name];
33-
if (legacyModule != null) {
34-
return legacyModule;
35-
}
27+
const legacyModule: ?T = NativeModules[name];
28+
if (legacyModule != null) {
29+
return legacyModule;
3630
}
3731

3832
return null;

packages/react-native/ReactCommon/react/nativemodule/core/ReactCommon/TurboModuleBinding.cpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -128,7 +128,6 @@ void TurboModuleBinding::install(
128128
return;
129129
}
130130

131-
defineReadOnlyGlobal(runtime, "RN$UnifiedNativeModuleProxy", true);
132131
defineReadOnlyGlobal(
133132
runtime,
134133
"nativeModuleProxy",

0 commit comments

Comments
 (0)