Skip to content

Expo rewrite to let us showcase Expo-related features - #131

Open
alwx wants to merge 1 commit into
masterfrom
alwx/expo-rewrite
Open

Expo rewrite to let us showcase Expo-related features#131
alwx wants to merge 1 commit into
masterfrom
alwx/expo-rewrite

Conversation

@alwx

@alwx alwx commented Sep 9, 2026

Copy link
Copy Markdown

Motivation

Most of our users use Expo nowadays but our sample app doesn't. In addition, we've recently introduced a bunch of Expo-related features that you cannot showcase without Expo.

What this PR does

Rewrites the demo app using Expo (managed workflow), replacing the bare React Native setup with native android/ and ios/ directories.

Fixes getsentry/sentry-react-native#6490

This is a literal migration — all parts of the app have been ported to Expo. The large number of affected lines is due to the structural change (removing native project directories, replacing entry point, adopting Expo config), not functional changes.

What's there:

  • All 10 screens migrated (Shop, Cart, Debug screens)
  • Sentry.init with the same integrations and configuration
  • Redux, all components, utilities, Maestro tests — that all remains unchanged

Intentionally swapped for Expo equivalents:

  • react-native-vector-icons -> @expo/vector-icons
  • react-native-linear-gradient -> expo-linear-gradient
  • react-native-dotenv -> Expo-native EXPO_PUBLIC_* env vars
  • Native build scripts (build-dev-android etc.) migrated to Expo CLI (expo start, expo android)
  • android/, ios/, Gemfile removed — Expo handles the native layer via EAS

As 99% of the code remains unchanged, the best way to verify it is by running it and checking that the data is correctly being sent and handled by Sentry.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@alwx alwx changed the title Expo rewrite Expo rewrite to let us showcase Expo-related features. Sep 9, 2026
@alwx alwx changed the title Expo rewrite to let us showcase Expo-related features. Expo rewrite to let us showcase Expo-related features Sep 9, 2026
@alwx
alwx marked this pull request as ready for review September 9, 2026 07:37
@antonis
antonis requested review from antonis and nw-sentry September 9, 2026 07:48

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: On Android there is an overlap of the home screen title with the camera cut. Probably an existing issue in the old app but worth fixing with the migration.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: On iOS the product details screen is not scrollable and I'm not able to add items in the cart from there

Comment thread app.json
"icon": "./assets/icon.png",
"userInterfaceStyle": "light",
"ios": {
"supportsTablet": true

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I needed to add a bundle identifier to run the app on iOS. Eg.

Suggested change
"supportsTablet": true
"supportsTablet": true,
"bundleIdentifier": "com.sentry.reactnative.expo.demo"

Comment thread app.json
"ios": {
"supportsTablet": true
},
"android": {

@antonis antonis Sep 9, 2026

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I needed to add a package to run the app on Android. Eg.

Suggested change
"android": {
"android": {
"package": "com.sentry.reactnative.expo.demo",

Comment thread app.json
"@sentry/react-native",
{
"url": "https://sentry.io/",
"organization": "sentry-sdks",

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this is not correct since the demo has a different org.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please also check the project below.

Comment thread app.json
"expo": {
"name": "sentry_react_native_expo",
"slug": "sentry_react_native_expo",
"version": "1.0.0",

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think the version was not set but defined dynamically in the old app

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

h: All the build and test workflows are deleted. We need those both to validate the app but also for the team to be able to create new releases for demos and to generate data.

Comment thread package.json
Comment on lines +13 to +14
"expo-linear-gradient": "~57.0.1",
"expo-status-bar": "~57.0.1",

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

l: we should check if those are used, otherwise let's remove them

Comment thread app.json
"version": "1.0.0",
"orientation": "portrait",
"icon": "./assets/icon.png",
"userInterfaceStyle": "light",

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Comment thread App.tsx
import {SentryUserFeedbackActionButton} from './src/components/UserFeedbackModal';

// SE is read from EXPO_PUBLIC_SE environment variable (.env file)
const SE = process.env.EXPO_PUBLIC_SE;

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this would break the fingerprint logic below. We should probably revert to the previous .env import

@antonis antonis left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Awesome work migrating the app to Expo @alwx 🙇 We can iterate on top of this to add all the latest Expo features (router etc) and showcase them in our demo :)

Overall looks good. I've left some comments inline.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Migrate Empower Plant to Expo and showcase Expo-related features

2 participants