JD’s HarmonyOS Native App Development with Taro: Technical Solution, Features, Performance and Future Plans
The article details JD’s 2024 initiative to build HarmonyOS native applications using the cross‑platform Taro framework, describing the chosen technical solution, key advantages such as Web‑style development, CSS optimizations, rendering performance, virtual list support, and future optimization plans.
Background
In January 2024 JD launched HarmonyOS native app development, leveraging HarmonyOS NEXT’s full‑scene, native intelligence, and security features to provide a smoother, smarter, and safer shopping experience. By June the trial version was released on Huawei AppGallery, with a full release planned for September.
Since 2020 JD and Huawei have cooperated strategically, investing heavily in exploring HarmonyOS innovations. As an early partner in the Huawei ecosystem, JD worked closely with Huawei to overcome adaptation challenges and jointly promoted a multi‑device unified development solution, with Taro being the first framework to support native ArkUI development.
This article explains the technical solution, characteristics, performance results, and future optimization plans of JD’s HarmonyOS native app, highlighting why Taro was chosen for its Web‑paradigm support, rapid migration, rendering optimizations, high‑level features, and hybrid development capabilities.
Technical Solution
To deliver the project efficiently while ensuring performance and user experience, JD evaluated two options: native ArkTS development or a cross‑platform framework. Native ArkTS posed long development cycles and high maintenance costs across multiple platforms, so JD opted for a cross‑platform framework.
Taro, an open‑source cross‑platform framework from JD’s Aotu Lab, enables a single codebase to run on H5, mini‑programs, and HarmonyOS. Using Taro’s compilation ability, the entire project can be transformed into an independent HarmonyOS app without extra work, and parts of the project can be packaged as native modules.
The core infrastructure (routing, location, permissions) is provided by JD’s retail mpass team, while Taro handles native page rendering and bridges to these capabilities. Developers simply execute Taro commands to package the project as a native HarmonyOS app.
Technical Features
Web‑style Development for HarmonyOS
Taro adapts most CSS capabilities for HarmonyOS, including flex layout, pseudo‑classes/elements, absolute/fixed positioning, media queries, units (vh, vw, calc), CSS variables, and safe‑area definitions.
The CSS compilation uses Rust‑based LightningCSS, dramatically speeding up parsing and processing.
At runtime, Taro follows a WebKit‑like processing flow, upgrading CSS rule matching and dirty‑checking to improve performance.
Rapid Migration of Existing Taro Projects
Taro enables low‑cost migration of existing projects to HarmonyOS while preserving high fidelity and performance.
Rendering Performance Comparable to Native
Instead of recursive ArkTS component rendering, Taro shifts most runtime logic (components, animations, layout) to a C++ layer, boosting rendering speed.
CSS handling was re‑architected and integrated with the Yoga layout engine, creating an efficient rendering pipeline that rivals native ArkTS performance.
High‑Level Features: Virtual Lists and Node Reuse
Taro provides long‑list components (WaterFlow & List) with lazy loading, pre‑loading, and node reuse, solving performance issues for large data sets such as product or message lists.
Native‑Hybrid Development Support
When required components or APIs are missing in Taro, developers can embed native pages or components, allowing mixed use of Taro and native HarmonyOS UI elements.
Performance Results
JD HarmonyOS Native App Metrics
After multiple optimizations, the home page rendering time is 1062 ms (23.9% faster than the previous ArkTS version) and the product detail page renders in 560 ms (74.2% faster).
The performance gains stem from CSS parsing and property application improvements in the CAPI version, as well as the overall rendering pipeline enhancements.
Most pages passed Huawei Performance Factory’s acceptance tests, confirming Taro’s high performance on HarmonyOS.
Summary and Future Outlook
Taro has become a full‑business‑domain cross‑platform solution, unifying Web (mini‑programs, Hybrid) and native (iOS, Android, HarmonyOS) development. Its high‑performance HarmonyOS adaptation enables rapid expansion to the emerging ecosystem.
Future Plans
Separate developer JS business code and framework JS from the UI thread, creating a dedicated JavaScript thread to avoid UI blockage.
Flatten view nodes by merging non‑layout‑affecting nodes, reducing the number of components drawn on screen.
Implement native‑level dynamic update capabilities, allowing page and feature updates without recompiling or republishing the app.
Conclusion
JD’s HarmonyOS native app is the first successful Taro adaptation on the platform, demonstrating the feasibility of Taro for high‑performance, multi‑device development and paving the way for broader enterprise adoption.
Signed-in readers can open the original source through BestHub's protected redirect.
This article has been distilled and summarized from source material, then republished for learning and reference. If you believe it infringes your rights, please contactand we will review it promptly.
JD Tech Talk
Official JD Tech public account delivering best practices and technology innovation.
How this landed with the community
Was this worth your time?
0 Comments
Thoughtful readers leave field notes, pushback, and hard-won operational detail here.
