Mobile Development 7 min read

ohos_react_native: Adapting React Native 0.72.5 to OpenHarmony with Fabric and TurboModule

The article explains how the open‑source ohos_react_native project brings React Native 0.72.5 to OpenHarmony, detailing its support for the New Architecture, Fabric rendering, C‑API performance gains, TurboModule variants, and the current migration status of related packages.

Rare Earth Juejin Tech Community
Rare Earth Juejin Tech Community
Rare Earth Juejin Tech Community
ohos_react_native: Adapting React Native 0.72.5 to OpenHarmony with Fabric and TurboModule

One year after the announcement of HarmonyOS Next, the OpenHarmony SIG released ohos_react_native , an open‑source adaptation of React Native 0.72.5 for HarmonyOS that supports most New Architecture capabilities such as Interop Layers, while lacking Bridgeless Mode and Suspense & Transitions.

Unlike Flutter’s HarmonyOS version, this React Native based solution can leverage the New Architecture, offering a more complete feature set for developers.

Fabric replaces the old UI Manager in the New Architecture, receiving component information from React Native and delegating rendering to the native OS. In ohos_react_native the rendering path uses XComponent as a C‑API surface, shortening the pipeline and improving efficiency.

The C‑API brings several performance benefits: minimal C‑side component creation without cross‑language calls, no need to convert string , enum or other types to object before processing in C++, and property diffing to avoid redundant updates.

XComponent acts like a surface for graphics and media data, similar to how Flutter implements its rendering layer, and is used for scenarios such as camera preview or video playback that require EGL/OpenGLES.

In the current C‑API implementation, the root view is an XComponent placeholder that mounts C‑API components. It can render ArkTS leaf nodes like Image , but container nodes such as Stack are not supported, meaning C‑API components can be mixed with ArkTS leaf components.

TurboModule provides the bridge between JavaScript and native code. Two variants exist: ArkTSTurboModule , which uses NAPI to call native ArkTS APIs synchronously or asynchronously, and cxxTurboModule , which implements system‑independent functionality (e.g., NativeAnimatedTurboModule ) directly in C++ for higher efficiency.

TurboModules can be generated with the React Native codegen‑harmony scripts. The generated files are added to the build via CMakeLists.txt using add_library and target_include_directories to produce the required shared objects.

The NPM package for ohos_react_native is @react-native-oh-tpl ; over 70 of the planned 300+ packages have already been migrated.

Overall, the open‑source release shows a high level of completeness, offering a practical path for RN developers to adapt their apps to HarmonyOS, with the upcoming HarmonyOS NEXT expected soon.

mobile developmentReact NativeOpenHarmonyC-APITurboModuleFabric
Rare Earth Juejin Tech Community
Written by

Rare Earth Juejin Tech Community

Juejin, a tech community that helps developers grow.

0 followers
Reader feedback

How this landed with the community

login Sign in to like

Rate this article

Was this worth your time?

Sign in to rate
Discussion

0 Comments

Thoughtful readers leave field notes, pushback, and hard-won operational detail here.