Skip to content

Commit 4bfc56d

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

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
@@ -10,9 +10,13 @@ import {
1010
} from './resource-logger';
1111
const { PerformanceObserver, addEntry, performance } = createPerformance();
1212

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

15-
const isTurboModuleEnabled = global.__turboModuleProxy != null;
18+
const isTurboModuleEnabled =
19+
global.RN$Bridgeless || global.__turboModuleProxy != null;
1620

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

0 commit comments

Comments
 (0)