跪拜 Guibai
← All articles
Frontend · Android · iOS

Stop Blindly Copying Flutter: The Four Cost Ledgers That Decide Cross-Platform Architecture in 2026

By 疯华整猫 ·
Read original on juejin.cn ↗ Google Translate ↗ Alt translation

The analysis gives Western teams a concrete framework for cross-platform decisions, especially when China's mini-program and HarmonyOS ecosystems enter the picture. It shows why "shared code" is a red herring and makes the case that any project with real hardware needs a native layer from day one, no matter which framework is chosen.

Summary

A detailed 2026 cost analysis for Android, iOS, and mini-program architecture selection argues that the "one codebase, three platforms" promise is usually a trap. The real decision is where you draw the cross-platform boundary — UI, business logic, or full compile-to-everything — because each changes how the four ledgers (custom components, hardware, performance, maintenance) are calculated.

The article systematically compares Flutter, React Native, Kotlin Multiplatform, and mini-program frameworks (uni-app, Taro, containers) across each ledger. Key findings: hardware SDKs (only `.aar`/`.framework`) force native modules anyway, so framework choice becomes secondary; the performance gap between major frameworks has narrowed to within 10% of native, making hot-reload quality more important than engine speed; and React Native's breaking-change history is its biggest long-term cost, mitigated by Expo.

The author's conclusion is to avoid committing to a single framework and instead adopt a five-layer architecture (design tokens, pure logic in Kotlin/TS, platform capability abstraction, per-platform UI, and native hardware layer). This lets each layer be decided and replaced independently. The article also treats HarmonyOS as an unavoidable fourth platform in China, warns against betting on early third-party multi-platform frameworks for it, and provides a quick-reference table for selection based on team background and hardware requirements.

Takeaways
— The phrase "cross-platform" is meaningless without specifying the boundary: UI, business logic, or full compile-to-all-runtimes. Each shifts the cost distribution.
— In a three-platform project, sharing 30–50% of code is normal, 60% is good, and anything above 70% usually means you've compromised on one platform.
— Flutter self-draws every pixel, so visual consistency is cheap but native iOS feel (swipe-back, pull-to-refresh, sheet damping) requires extra work.
— React Native renders real platform views, so native feel is free but visual consistency across platforms requires token-driven style files that inevitably split into .ios and .android variants.
— Kotlin Multiplatform offers both shared-logic (native UI) and shared-UI (Compose Multiplatform) options; shared-UI on iOS via Skiko has the same native-feel problems as Flutter.
— Compiling KMP for iOS requires a macOS runner, which can double CI infrastructure costs (a 150-person team saw this after full adoption).
— Mini-program custom components have no cross-platform reuse: WeChat, Alipay, and Douyin each need their own component logic, style isolation, and event models.
— For hardware SDKs that only ship .aar/.framework, you'll write native modules no matter which framework you pick — the framework choice becomes irrelevant the moment hardware integration begins.
— Flutter's Impeller and RN's New Architecture have narrowed the performance gap to native; in 2026, "RN is slow" and "Flutter has big package size" are no longer decisive.
— Flutter's Stateful Hot Reload is its most underappreciated advantage, keeping the cost of trial-and-error extremely low.
— Mini-program performance bottlenecks are in setData serialization, not the framework; use incremental updates, subpackaging, and virtual lists to stay under the 2MB main-package limit.
— uni-app x's steam mode compiles to native (Kotlin/Swift/ArkTS) and shows 1.85–3x rendering speedups over native in vendor benchmarks, but only on App side; mini-program inherits the mini-program runtime.
— React Native's major version cadence (1–2/year) and breaking changes are its biggest long-term maintenance deduction; Expo mitigates this with managed versioning, build, OTA, and upgrade scripts.
— Dart talent pool is small (5.9% of Stack Overflow respondents vs 66% for JavaScript), making Flutter hiring harder outside major cities.
— The biggest hidden cross-platform cost is the same bug being fixed three times and the test matrix tripling; layered architecture controls blast radius.
— HarmonyOS is unavoidable for China-facing apps; using mature paths (ArkTS or KMP official support) is safer than betting on third-party early one-code-five-platform frameworks.
— If your users are on only one platform, cross-platform is a pure loss — introducing extra runtime, build chain, and hiring costs for zero reuse is a math problem, not a technical one.
Conclusions

The post's central claim that hardware inevitably forces a native layer effectively neutralizes most cross-platform selling points for any project with serious device integration; teams should verify this before evaluating UI frameworks.

The comparison of code reuse expectations (30–50% normal, 60% good, 70% means compromise) is a useful sanity-check metric that senior engineers can apply to any vendor's "one codebase" pitch.

The author's layered architecture (design tokens, pure logic, capability abstraction, UI, native) is not new, but applying it to the China-specific constraints of mini-programs and HarmonyOS gives it a practical edge that generic cross-platform advice often misses.

The claim that Flutter's hot reload is more valuable than raw performance reflects a shift in the cross-platform debate: the bottleneck for most teams is iterative debugging, not runtime speed.

The article's treatment of HarmonyOS as a separate platform with its own maturity risks suggests that the Chinese market is effectively forcing teams to bet on either official (ArkTS) or community-led (KMP) paths, and that third-party universal frameworks carry high uncertainty in that context.

Concepts & terms
Kotlin Multiplatform (KMP)
A JetBrains technology that shares business logic (data models, network, rules) across Android, iOS, and other targets while allowing per-platform UI. `expect/actual` provides platform-specific implementations for shared declarations, and `cinterop` binds to native C/ObjC APIs.
Compile Multiplatform (CMP)
JetBrains' shared-UI framework built on Compose, which renders on iOS via Skiko/Skia. It is not native UIKit/SwiftUI controls, so system interactions like swipe-back and navigation transitions need custom simulation or UIKit interop.
expect/actual
A Kotlin Multiplatform mechanism that declares a common API in shared code (`expect`) and provides platform-specific implementations (`actual`) per target, allowing shared logic to call platform APIs.
cinterop
Kotlin/Native's tool for directly binding to C and Objective-C libraries, enabling direct calls to platform APIs like Android NDK/JNI or iOS CoreBluetooth without writing a separate native module.
Impeller
Flutter's advanced rendering engine that precompiles shaders to avoid runtime shader-compilation jank. It has been the default renderer on iOS and is enabled by default on Android API 29+ as of 2026.
Fabric + JSI + TurboModules
The core of React Native's New Architecture: Fabric is the new rendering system, JSI (JavaScript Interface) enables synchronous communication between JS and native without serialization, and TurboModules replace the old Bridge for native module calls.
Steam mode (uni-app x)
uni-app x's App-side compilation path where UTS code compiles directly to native Kotlin/Swift/ArkTS, skipping the WebView layer. It achieves near-native rendering performance in vendor benchmarks, but does not benefit mini-program targets, which still run in the mini-program runtime.
Skyline
WeChat's newer rendering engine for mini-programs that can improve performance, but it is WeChat-only and not applicable to other mini-program platforms.
Kuikly
A Tencent open-source framework built on KMP, targeting Android, iOS, HarmonyOS, H5, and mini-programs with AOT-compiled native binaries. It claims small SDK sizes and fast H5 first-contentful-paint.
From the discussion
Featured comments
小飞码

We're all going AI now, why bother with unified development? Just do native development everywhere. That way, for AI, it's actually easier — each side decoupled, no conflicts.

疯华整猫

But in reality, managers who don't understand pretend to know, then blindly direct the experts below to achieve their own goals, like having Android implement a feature that already exists on iOS and also keep performance consistent [facepalm]

Ying影  → 疯华整猫

For consistency, an HTML wrapper is the ultimate answer.

See top comments, translated →
Source: juejin.cn ↗ Google Translate ↗ Backup ↗