Skip to content

Commit a918276

Browse files
committed
improvement(newArch): Time To Initial Display / Time To Full Display implemented via Fabric components
1 parent 96d7706 commit a918276

2 files changed

Lines changed: 6 additions & 18 deletions

File tree

packages/core/src/js/tracing/timetodisplay.tsx

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -62,17 +62,6 @@ function TimeToDisplay(props: {
6262
parentSpanId?: string;
6363
}): React.ReactElement {
6464
const RNSentryOnDrawReporter = getRNSentryOnDrawReporter();
65-
const isNewArchitecture = isTurboModuleEnabled();
66-
67-
if (__DEV__ && (isNewArchitecture || (!nativeComponentExists && !nativeComponentMissingLogged))){
68-
nativeComponentMissingLogged = true;
69-
// Using setTimeout with a delay of 0 milliseconds to defer execution and avoid printing the React stack trace.
70-
setTimeout(() => {
71-
logger.warn(
72-
'TimeToInitialDisplay and TimeToFullDisplay are not supported on the web, Expo Go and New Architecture. Run native build or report an issue at https://github.com/getsentry/sentry-react-native');
73-
}, 0);
74-
}
75-
7665
return (
7766
<>
7867
<RNSentryOnDrawReporter

samples/react-native/src/Screens/WebviewScreen.tsx

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2,21 +2,20 @@ import * as React from 'react';
22
import * as Sentry from '@sentry/react-native';
33
import { StyleSheet, View } from 'react-native';
44
import { Text } from 'react-native-gesture-handler';
5-
import { isTurboModuleEnabled } from '@sentry/react-native/dist/js/utils/environment';
65

76
const WebviewScreen = () => {
8-
console.log('ALWX IS TURBO MODULES ENABLED: ' + isTurboModuleEnabled());
97
return (
108
// <WebView
119
// source={{ uri: 'https://sentry.io' }}
1210
// style={styles.webview}
1311
// />
1412
<View style={styles.webview}>
15-
<Sentry.TimeToInitialDisplay record={true} />
16-
<Text>
17-
WebView is disabled due to incompatibilities with the React Native
18-
version 0.79.2
19-
</Text>
13+
<Sentry.TimeToInitialDisplay record={true}>
14+
<Text>
15+
WebView is disabled due to incompatibilities with the React Native
16+
version 0.79.2
17+
</Text>
18+
</Sentry.TimeToInitialDisplay>
2019
</View>
2120
);
2221
};

0 commit comments

Comments
 (0)