Peacock Aug 17, 2023

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

Critical Insight

Going native delivered double-digit improvements in both app size and startup time by eliminating React Native overhead.

The article reveals why Peacock's hybrid approach was actually costing them more than a typical React Native setup.

About This Article

Problem

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.

Solution

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.

Impact

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.