From acbfd3e517b8874eede88ec8e07f14d80a9ffe35 Mon Sep 17 00:00:00 2001 From: Alexander Date: Mon, 4 Aug 2025 18:04:00 +0200 Subject: [PATCH] docs(react-native): Update the docs in accordance to how the current structure of an Expo project looks like --- docs/platforms/react-native/manual-setup/expo.mdx | 14 +++++--------- 1 file changed, 5 insertions(+), 9 deletions(-) diff --git a/docs/platforms/react-native/manual-setup/expo.mdx b/docs/platforms/react-native/manual-setup/expo.mdx index 00a4d6f32726a..e3ba1ee5d2b8d 100644 --- a/docs/platforms/react-native/manual-setup/expo.mdx +++ b/docs/platforms/react-native/manual-setup/expo.mdx @@ -67,7 +67,7 @@ pnpm add @sentry/react-native Import the `@sentry/react-native` package and call `init` with your DSN: ```javascript {tabTitle:App.js or app/_layout.js} -import { Text, View } from "react-native"; +import { Stack } from "expo-router"; import * as Sentry from "@sentry/react-native"; Sentry.init({ @@ -89,15 +89,11 @@ Sentry.init({ // ___PRODUCT_OPTION_END___ profiling }); -function App() { - return ( - - Expo Example! - - ); +function RootLayout() { + return ; } -export default Sentry.wrap(App); +export default Sentry.wrap(RootLayout); ``` ### Wrap Your App @@ -105,7 +101,7 @@ export default Sentry.wrap(App); Wrap the root component of your application with `Sentry.wrap`: ```javascript {tabTitle:App.js or app/_layout.js} -export default Sentry.wrap(App); +export default Sentry.wrap(RootLayout); ``` ### Add the Sentry Expo Plugin