Skip to content

Commit 78e2e83

Browse files
authored
fix: new architecture detection on RN 0.77+ (#116)
1 parent c950693 commit 78e2e83

File tree

1 file changed

+6
-2
lines changed
  • packages/react-native-performance/src

1 file changed

+6
-2
lines changed

packages/react-native-performance/src/index.ts

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,13 @@ import {
99
} from './resource-logger';
1010
import { PerformanceObserver, addEntry, performance } from './instance';
1111

12-
declare const global: { __turboModuleProxy: null | {} };
12+
declare const global: {
13+
__turboModuleProxy: null | {};
14+
RN$Bridgeless?: boolean;
15+
};
1316

14-
const isTurboModuleEnabled = global.__turboModuleProxy != null;
17+
const isTurboModuleEnabled =
18+
global.RN$Bridgeless || global.__turboModuleProxy != null;
1519

1620
const RNPerformanceManager = isTurboModuleEnabled
1721
? require('./NativeRNPerformanceManager').default

0 commit comments

Comments
 (0)