Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Select an option

  • Save nautilytics/19903f6a76dbadfd384212c1d54a5a05 to your computer and use it in GitHub Desktop.

Select an option

Save nautilytics/19903f6a76dbadfd384212c1d54a5a05 to your computer and use it in GitHub Desktop.
React Native New Architecture Migration

React Native New Architecture Migration - Executive Summary

Current Status ✅

Your app is already running on the New Architecture!

  • ✅ React Native 0.76.9 (New Architecture enabled by default)
  • ✅ Expo SDK 52.0.47 (Full New Architecture support)
  • ✅ Hermes JS Engine enabled
  • newArchEnabled: true configured in app.config.ts

What's Next?

While the New Architecture is enabled, you need to:

  1. Update dependencies for optimal compatibility
  2. Refactor code to leverage new features
  3. Verify critical integrations work correctly
  4. Test thoroughly before production rollout

Quick Action Items

🔴 CRITICAL - Do First

  1. Verify Authentication - Test Okta integration thoroughly
  2. Verify Payments - Test Plaid integration
  3. Verify Feature Flags - Test LaunchDarkly
  4. Run Tests - Ensure existing functionality works

🟡 HIGH PRIORITY - Week 1

  1. Update @apollo/client to latest 3.11.x
  2. Update react-native-reanimated to latest
  3. Update react-native-screens to latest
  4. Run full test suite

🟢 MEDIUM PRIORITY - Week 2-3

  1. Update @react-navigation/* to v7
  2. Update @sentry/react-native
  3. Verify third-party SDK compatibility
  4. Refactor onLayout to useLayoutEffect (4 files)

Key Benefits You'll Get

1. Synchronous Layout & Effects

  • No more visual jumps from onLayout
  • Smoother UI updates
  • Better user experience

2. React 18 Concurrent Features

  • useTransition for responsive UI
  • useDeferredValue for smooth inputs
  • Suspense for better loading states
  • Automatic batching (already working!)

3. Better Performance

  • Faster JavaScript/Native communication (JSI)
  • Improved rendering performance
  • Smoother animations
  • Lower memory usage

Files to Update

Code Refactoring (4 files)

  1. src/@payments/screens/FundingAccountsScreen/FundingAccountsScreen.tsx
  2. src/@payments/screens/PaymentsFlow/PaymentSlider/PaymentSliderScreen.tsx
  3. src/@payments/screens/PaymentsFlow/PaymentSlider/SliderSection.tsx
  4. src/@core/navigation/screens/LockCardScreen/LockCardScreen.tsx

Configuration

  • app.config.ts - Already updated with newArchEnabled: true
  • package.json - Will be updated with new dependency versions

Risk Assessment

Low Risk ✅

  • Apollo Client update
  • Reanimated update
  • Screens update
  • Most Expo packages

Medium Risk ⚠️

  • React Navigation v7 upgrade
  • Sentry update
  • Code refactoring

High Risk 🔴

  • Okta SDK (has patch, needs verification)
  • Plaid SDK (payment critical)
  • LaunchDarkly (feature flags critical)

Testing Strategy

Phase 1: Smoke Tests

npm test
npm run typecheck
npm run lint

Phase 2: E2E Tests

npm run maestro:ios:all
npm run maestro:android:all

Phase 3: Manual Testing

  • Authentication flows
  • Payment flows
  • Navigation
  • Animations
  • Push notifications
  • Feature flags

Timeline

Week 1: Foundation

  • Update low-risk dependencies
  • Run automated tests
  • Verify core functionality

Week 2: Navigation & Services

  • Update React Navigation
  • Verify critical SDKs
  • Begin code refactoring

Week 3: Monitoring & Analytics

  • Update Sentry
  • Verify analytics SDKs
  • Complete code refactoring

Week 4: Polish & Deploy

  • Final testing
  • Performance validation
  • Documentation
  • Gradual rollout

Success Metrics

Track these before and after:

  • App startup time
  • Navigation performance
  • Animation frame rate (target: 60 FPS)
  • Memory usage
  • Crash rate
  • User-reported issues

Rollback Plan

If issues occur:

# Quick rollback
git checkout package.json package-lock.json
npm install
npx expo prebuild --clean

# Emergency disable New Architecture
# Set newArchEnabled: false in app.config.ts
npx expo prebuild --clean

Resources


Next Steps

  1. Review the detailed dependency plan
  2. Discuss with team about timeline
  3. Create a feature branch for updates
  4. Start with Phase 1 low-risk updates
  5. Test thoroughly after each phase
  6. Monitor metrics closely

Status: Ready to begin implementation
Last Updated: 2025-10-01
Owner: Technical Product Owner

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