This is a demo repo used by Solution Engineers when demo'ing Sentry's React Native SDK's capabilities. This version is built with Expo (SDK 57).
| Home Screen | Product Detail | Cart |
|---|---|---|
![]() |
![]() |
![]() |
See package.json for up to date information about the @sentry/react-native SDK, react-native, and expo versions.
git clone git@github.com:sentry-demos/sentry_react_native.git- Optional — Add your DSN and BACKEND_URL to
src/config.ts - Optional — Create
.env.localin project root and addEXPO_PUBLIC_SE=<value> export SENTRY_AUTH_TOKEN=<token>— How to generate a Sentry Auth Tokennpm install
This app uses native modules (the Sentry config plugin), so it can't run in Expo Go —
npm run android / npm run ios generate the native projects and build a dev client.
# Start the Metro dev server against an already-installed dev build
npm start
# Generate the native project and build/install it
npm run android
npm run iosFor release builds, the same flow CI uses (see .github/workflows/build-*.yml):
npx expo prebuild --platform android
cd android && ./gradlew :app:assembleReleaseThe generated android/ and ios/ directories are gitignored — expo prebuild
recreates them from app.config.js, so don't edit them by hand.
Expo reads .env.local automatically. Variables must be prefixed with EXPO_PUBLIC_ to be accessible in app code:
EXPO_PUBLIC_SE=tda
This replaces the react-native-dotenv / @env approach from the bare RN version.
| Area | Bare RN | Expo |
|---|---|---|
| Icons | react-native-vector-icons |
@expo/vector-icons (built-in) |
| Env vars | import {SE} from '@env' |
process.env.EXPO_PUBLIC_SE |
| Metro config | withSentryConfig |
getSentryExpoConfig |
| Build | react-native run-* |
expo prebuild + expo run:* |
| Sentry plugin | Android Gradle plugin | Expo config plugin (@sentry/react-native) |
See troubleshooting.md for tips.


