The Peacock app just made the switch from ReactNative to iOS & Android and had a significant change in size and startup time
Article Summary
Peacock just ditched React Native for fully native iOS and Android. The performance gains? Significant.
NBCUniversal's streaming app made the switch in April 2023, removing all React Native dependencies. Emerge Tools analyzed the before and after using their X-Ray tooling to measure the real impact on app size and startup performance.
Key Takeaways
- Android app size dropped 26% (7.6 MB smaller)
- iOS app shrank 13% (12.6 MB reduction)
- Android launch time improved 18.2% by removing React Native initialization
- Peacock wasn't even using RN for UI, just business logic
- Team plans to eliminate JavaScriptCore next for full native implementation
Going native delivered double-digit improvements in both app size and startup time by eliminating React Native overhead.
About This Article
Peacock's React Native setup included a lot of unnecessary overhead. The Yoga layout framework and folly C++ utilities weren't actually rendering the UI, since the team only used RN for business logic and kept the interface native.
Emerge Tools used X-Ray to map out React Native dependencies across the app architecture. The team then swapped RN utilities for native equivalents: CoreAnimation replaced RCTAnimation, UIImage and CoreImage replaced RCTImage, and UIKit with CoreText replaced RCTText.
Removing precompiled binaries and JavaScript files cut about 400ms from Facebook soLoader initialization on Android. Native system frameworks handled the same work without increasing the app bundle size.