React Native at Instagram
Article Summary
Instagram stayed single-dex on Android while integrating React Native. Martin Bigio and the Core Client team reveal how they pulled it off without bloating their app.
In early 2016, Instagram began exploring React Native to boost developer velocity across iOS and Android. The challenge? Integrating it into a massive existing native app without sacrificing performance, binary size, or Instagram's single-dex status on Android.
Key Takeaways
- Selectively imported only needed view managers, adding just 3,500 methods to Android
- Achieved 85-99% code sharing across products like Post Promote and Comment Moderation
- Post Promote startup times dramatically improved over previous WebView implementation
- Leveraged Random Access Module Bundling and Inline Requires for performance gains
- Metrics showed neutral impact on crashes and out-of-memory errors
Critical Insight
Instagram shipped features faster with React Native while maintaining their strict performance standards and single-dex Android build.