React Native at Traveloka: Hybrid Development Experience
Article Summary
Adrian Hartanto from Traveloka reveals how his team pulled off a seemingly impossible challenge: integrating React Native into production iOS and Android apps in just 3 weeks without disrupting native development.
Traveloka needed to add React Native to their existing native mobile apps (a 'brownfield' integration). The engineering team had to solve complex problems around repository management, app size bloat, and keeping native and React Native workflows completely separate.
Key Takeaways
- Used git submodules to isolate React Native, iOS, and Android workflows
- Cut Android APK size by 7MB after initial 15MB bloat
- Reduced React Native startup time from 3 seconds to 100-200ms with preloading
- Created no-op modules on Android so native devs never need Node.js installed
- Daily release builds catch deployment issues before production
Brownfield React Native integration is complex upfront, but the one-time setup cost pays off with faster feature development and code sharing across platforms.
About This Article
Traveloka's iOS and Android teams ran into version conflicts when they tried to use React Native alongside their existing native codebase. React Native needed different versions of third-party dependencies than what the native code was already using.
The team forked React Native and modified it to work with their YogaKit version. On iOS, they set up Cocoapods to pull dependencies from git repositories instead of the standard sources. This meant native developers no longer had to install Node.js just to run their code.
Native developers could build and run their code without extra setup steps. The forked repository fixed the dependency conflicts and let both platforms stay flexible during development.