Traveloka Adrian Hartanto Dec 4, 2018

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

Critical Insight

Brownfield React Native integration is complex upfront, but the one-time setup cost pays off with faster feature development and code sharing across platforms.

The team maintains a forked version of React Native itself to solve a specific dependency conflict (spoiler: it involves YogaKit).

About This Article

Problem

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.

Solution

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.

Impact

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.