Skip to content

Commit 035e13a

Browse files
committed
fix: new architecture detection on RN 0.77+
1 parent a77445a commit 035e13a

File tree

1 file changed

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

1 file changed

+4
-2
lines changed

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

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,11 @@ import {
1010
} from './resource-logger';
1111
const { PerformanceObserver, addEntry, performance } = createPerformance();
1212

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

15-
const isTurboModuleEnabled = global.__turboModuleProxy != null;
17+
const isTurboModuleEnabled = global.RN$Bridgeless;
1618

1719
const RNPerformanceManager = isTurboModuleEnabled
1820
? require('./NativeRNPerformanceManager').default

0 commit comments

Comments
 (0)