Skip to content

Commit 778c970

Browse files
authored
docs(expo-router): use more descriptive function
Uses a more descriptive function if the app is running in Expo Go instead of the comment.
1 parent 788912c commit 778c970

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

docs/platforms/react-native/tracing/instrumentation/expo-router.mdx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,11 +13,11 @@ The code snippet below shows how to initialize the instrumentation.
1313
```javascript {6-8, 15-16, 20-25} {filename: app/_layout.tsx}
1414
import React from 'react';
1515
import { Slot, useNavigationContainerRef } from 'expo-router';
16-
import Constants, { ExecutionEnvironment } from 'expo-constants';
16+
import { isRunningInExpoGo } from "expo"
1717
import * as Sentry from '@sentry/react-native';
1818

1919
const navigationIntegration = Sentry.reactNavigationIntegration({
20-
enableTimeToInitialDisplay: Constants.executionEnvironment === ExecutionEnvironment.StoreClient, // Only in native builds, not in Expo Go.
20+
enableTimeToInitialDisplay: !isRunningInExpoGo(),
2121
});
2222

2323
Sentry.init({
@@ -26,7 +26,7 @@ Sentry.init({
2626
// We recommend adjusting this value in production.
2727
tracesSampleRate: 1.0,
2828
integrations: [navigationIntegration],
29-
enableNativeFramesTracking: Constants.executionEnvironment === ExecutionEnvironment.StoreClient, // Only in native builds, not in Expo Go.
29+
enableNativeFramesTracking: !isRunningInExpoGo(),
3030
});
3131

3232
function RootLayout() {

0 commit comments

Comments
 (0)