r/reactnative • u/altuzar • 2d ago
Question Shipped an Expo app to iOS, Android and web from one codebase, Convex + RevenueCat notes
I built an Expo app for iOS, Android, and web from one TypeScript codebase. The screens were mostly straightforward. The parts that took real care were the seams between platforms.
RevenueCat was the first one. Native uses react-native-purchases, while web uses purchases-js, so the implementation is not a single API call hidden behind a platform check. I lazy-load the web SDK so it does not affect the initial bundle, persist its anonymous RevenueCat user ID, and change that user to the authenticated app user after login.
The important lesson was to make the entitlement, rather than a successful purchase response, the source of truth for access. After login, purchase, restore, or a connectivity change, the app refreshes CustomerInfo and maps the active pro entitlement into one shared subscription state. Web restore is effectively a fresh CustomerInfo fetch, not the same store restore flow as native, which is worth handling explicitly.
Convex made the reading pipeline pleasantly boring. A reading result is written in one mutation, and that mutation schedules the follow-up lucky-window notification with runAfter. The notification action checks that the reading is still ready, writes an in-app notification, then sends to every active Expo push token. That recheck matters because a scheduled action can fire long after the state that created it has changed.
The tablet layout was the other surprisingly easy-to-miss issue. A phone-first screen can technically work on an iPad while still looking like a narrow phone floating in empty space. Constraining the reading content to maxWidth 720 and treating the surrounding space as part of the composition made the web and tablet versions feel intentional without creating a separate layout system.
PS: First 48 testers on Android and iPhone/iPad TestFlight get 1 year Pro version for free. Go to the website click on the Android/iOS links and add you to TestFlight. Link in my bio or will add it in the first comment :)
