
Layer cake of react native platforms. Vega OS supports multiple form factors of devices.
Architectural tenets
Parity
React Native for Vega embraces the cross-platform principles of the React Native ecosystem, and aims to provide parity with RN APIs and popular libraries. RNV supports over 80% of RN core components and APIs. Additionally, RNV has ported over 40 RN libraries popular in the RN ecosystem. This support enables reuse of code across Vega OS and other OS platforms. RNV also includes APIs from RN tvOS to support focus management and event handling capabilities specific to TV devices. Additionally, where it makes sense, RNV includes specific APIs exclusive to a specific RN platform, such asBackHandler (Android), SafeAreaView (iOS).
The Vega SDK also includes support for common RN tooling and additional development and testing utilities to speed up app development while supporting a performant runtime. React Dev Tools, Chrome Dev Tool, Flashlight, and more are all available to use with RNV. You can leverage your existing workflows with these tools to work cross-platform.
Performance
Amazon designed React Native for Vega from the ground up to optimize for performance on Amazon devices. Your apps should meet Vega’s KPIs for performance. Amazon built RNV with React Native’s new architecture and benefits from all the improvements from RN core framework. The new architecture includes support for the following:- Synchronous layouts and events
- Concurrent rendering
- Fast JavaScript and native interop over JSI, including support for Turbo Modules.
Multi-profile and multi-modal
React Native for Vega supports a diverse set of Amazon devices, including TVs and smart speakers. It uses flexible layouts to fit content on different screen sizes. The Platform API helps apps adjust to different device types at runtime. You can also customize features for specific devices during the app building process using Vega’s build tools. Your users can control Amazon devices in different ways: through voice, touch, or remote controls. React Native for Vega (RNV) supports all these control methods automatically. RNV components work with both touchscreens and remote control D-Pads. The framework also includes Alexa voice control, letting users navigate apps and control media with voice commands. For TV apps specifically, RNV provides special tools to handle remote control navigation and focus management.Built on standards
RNV uses familiar web standards to build app features. While it aims to match React Native’s usual APIs, it also incorporates W3C standards for core functions. For example, RNV uses W3C standards for media playback, making it easy to use many existing JavaScript media players. In upcoming releases, RNV adds support for WebCrypto and WebWorkers, also based on web standards. By using these widely-adopted standards, RNV makes it simple to use many JavaScript libraries originally created for web browsers in Vega apps.Implementation
Amazon built React Native for Vega as an out-of-tree implementation of the React Native framework to support devices running Vega OS. RNV ported the React Native software stack including React Common, Yoga, and Hermes for Vega OS to run on top of Vega’s native UI framework. RNV uses React Native’s new architecture and only supports JSI for JavaScript to Native interfacing. RNV also supports the new Fabric renderer for synchronous layout and effect improvements and concurrent rendering. Additionally, RNV supports native integrations through Turbo Native modules and Fabric Native components for the Vega platform.
Layer cake for React Native for Vega out of tree implementation. RNV is integrated with Vega’s native UI framework, leveraging several of Vega’s middleware including graphics, application framework, etc.
Built into the OS, dynamically linked
RNV makes a unique architectural choice by bundling the entire React Native runtime into the Vega OS, which dynamically links with the apps at runtime. Alternatively, the existing Vega platforms statically link the runtime with the app binary and bundle with the app code.
This opinionated choice of app architecture optimizes on-disk storage, startup and app switch times, and memory usage on devices running Vega OS. Removing the React Native runtime reduces the app bundle size by over 10MB. Loading the runtime from the OS also allows the Vega platform to pre-warm process pools with it, providing faster startup times for React Native apps.
RNV also allows you to separate the main JavaScript code from the React and React Native libraries with split-bundling. Split-bundling reduces the app’s size by 1-2 megabytes and ensures it works well with the device’s operating system. When the app starts, it loads these separate React and React Native components along with the app’s own code. This approach is similar to how the standard React Native runtime works.

Figure: Build steps differences during a normal JS bundle built, and a split-bundle build with React Native for Vega. Only the App Bundle is packaged into the final app vpkg.
API and ABI stability
Including React Native in the Vega operating system creates some challenges. When React Native releases new versions with breaking changes, apps might stop working correctly. Since Hermes (the JavaScript engine) changes how it handles code, JavaScript code must be recompiled for each new release. Other platforms that use React Native avoid these problems by packaging the React Native runtime with each app. This runtime ensures the app always uses its built-in version. The current Vega operating system uses React Native version 0.72, with plans to update to a newer version soon. You need to check which React Native versions are available on Vega devices and set up your apps accordingly. Versioning helps ensure apps work properly on both current and future Vega devices and remain compatible with older versions. RNV offers two main solutions to handle compatibility issues:- Dual Bundle Packaging: RNV includes both the compiled and raw JavaScript code in each app. Therefore, new version updates to a device with the JavaScript engine (Hermes), the Amazon Appstore automatically recompiles the app’s code during installation.
- Version Control System: You can specify both minimum required and preferred versions of app dependencies. This versioning helps the Appstore determine which devices can run the app. RNV also provides a tool called
isPresentOnOSto check if specific dependency versions are available on a device.

