Continued from my last post...
Task 2: The Gauntlet of SDK Upgrades
This wasn't just a yarn upgrade, it was an architectural overhaul driven by technical debt around the database layer. We were still using SDK 51 and the most recent release is SDK 54. As a team we decided to upgrade to the first working SDK which was 52 so we could deploy to the app store (this turned out to be incorrect later down the line but.. a learning situation for sure).
The GGC app was using the legacy asynchronous SQLite bridge, which is now deprecated. We had to stabilize the app by migrating to the synchronous Legacy API in SDK 52, which eliminated critical race conditions at start up.
Core Upgrade Summary:
1. SDK 51 → SDK 52: Stabalization. I removed Drizzle Migrations and rebuilt the loading screen logic to be dependence on a synchronous schema setup and successful API sync. This was the most complex logical refactoring and included 16 individual version upgrades.
2. SDK 52 → SDK 53: JSI Integration. I brought in the JSI-ready modules for expo-sqlite, which immediately exposed a build-time vulnerability. This was fixed by adding a Babel module resolver alias to patch the Metro bundler's module lookup.
3. SDK 53 → SDK 54: High-Risk Architectural Bumps. I faced the breaking changes of React Native Reanimated v4 and mandatory dependency jumps for navigation libraries. This reinforced why incrementalism, while less efficient in merge-time, is safer for stability.
My Takeaway: Incremental upgrades are ideal for small bumps, but when facing major library overhauls (like Reanimated v4 requiring Fabric migration...), you must treat the upgrade as an architectural task and not just a dependency list update! Future-proofing required me to stabilize the database first!
This process was a valuable experience. After working as TPM and not touching code outside of YAML (github actions work yippee!) for sometime, this task involved me touching database logic, Typescript configs, modules, root layout changes and navigation/rendering.
My key takeaway from all of this was that technical debt can be crushing. It is best to get on a regular schedule of checking dependencies and keeping track of required updates. A weekly check-in can prevent a nightmare of problem solving 6 months from now.
#Expo #ReactNative #MobileDevelopment #TechnicalDebt #SDKUpgrade #JSI #DrizzleORM
Fire 👏 excited to check it out