Shopify moves back to Native from React Native
1271 points
• 4 days ago
• Article
Link
Shopify 宣布其移动工程战略发生重大转变:公司将放弃长期使用的 React Native,转而采用 Swift 与 Kotlin 进行原生开发。尽管 2020 年采用 React Native 在开发效率和功能一致性方面取得了显著成效,但编码代理与大型语言模型(LLM)的快速发展已从根本上改变移动开发的成本结构。由于 AI 现在能有效负责跨两个平台的功能翻译、实现与测试,以往需要"重复构建"的负担不再是决定性障碍。
此次回归原生源于对移动技术栈的原则性重新评估。尽管 React Native 仍是强大的框架,Shopify 认为原生开发能更好地利用平台特有能力与官方工具。借助 AI 代理承接大量编码工作,团队可以在不再承担过去高额维护成本的前提下,享受原生带来的性能与稳定性。
为推动这一转型,Shopify 对其核心应用(如 Shop 与主 Shopify app)采取 greenfield 路线。工程团队并非缓慢渐进迁移,而是借助名为 Helix 的专用系统,以结构化反馈循环推进:代码以小而可验证的检查点构建,每一段在继续之前都必须通过严格测试、视觉审查和对抗性代码分析。该流程确保最终代码库可维护、高质量且稳健。
迁移的关键环节之一是通过将业务逻辑与用户界面解耦来提升速度。构建可通过命令行以 headless 方式运行的架构,使 AI 代理能够在毫秒级而非分钟级完成测试与迭代,消除了传统模拟器交互的瓶颈,从而让代理自主且高效地工作。该架构既支持人类开发者也支持 AI,确保新的原生应用在长期内易于更新与维护。
在开源 React Native 库的支持上,Shopify 也在调整:React Native Skia 将过渡到社区主导,行业广泛使用的 FlashList 在 Shopify 寻找长期维护方期间仍由公司继续提供关键维护,Restyle 库则计划于 2026 年底归档。整个过渡过程将保持透明,以尽量减少对依赖这些工具的开发者社区的影响。
Shopify has announced a significant shift in its mobile engineering strategy, moving away from its long-standing commitment to React Native in favor of native development with Swift and Kotlin. While the company's 2020 decision to adopt React Native was highly successful in terms of developer efficiency and feature parity, the rapid advancement of coding agents and Large Language Models has fundamentally altered the economics of mobile development. Because AI can now effectively manage the translation, implementation, and testing of features across two separate platforms, the traditional burden of building twice is no longer a disqualifying factor.
The decision to migrate back to native stems from a first-principles reevaluation of the company's mobile tech stack. While React Native remains a strong framework, Shopify determined that native development offers superior access to platform-specific capabilities and first-party tooling. By utilizing AI agents to handle the heavy lifting of coding, the team can enjoy the benefits of native performance and stability without incurring the historical maintenance costs that once made building for each platform separately prohibitive.
To facilitate this transition, Shopify is implementing a greenfield approach for its major applications, such as Shop and the main Shopify app. Rather than performing a slow, gradual migration, the engineering team is utilizing a specialized system called Helix. This tool operates within a structured feedback loop where code is built in small, verifiable checkpoints. Each segment must pass rigorous testing, visual review, and adversarial code analysis before moving forward. This process ensures that the resulting codebase remains maintainable, high-quality, and robust.
A critical component of this migration involves optimizing for speed by decoupling business logic from the user interface. By building architectures that can run headlessly via a Command Line Interface, engineers allow AI agents to test and iterate on code in milliseconds rather than minutes. This strategy removes the bottleneck of traditional simulator interaction, enabling agents to work autonomously and efficiently. This architecture is designed to support both human developers and AI, ensuring that the new native apps remain easy to update and manage in the long term.
As part of this shift, Shopify is adjusting the support for its popular open-source React Native libraries. React Native Skia will be transitioned to a community-led model, while FlashList—a tool used widely across the industry—will see Shopify continue to provide critical maintenance while the company searches for a long-term steward. Meanwhile, the Restyle library will be archived at the end of 2026. This transition is being handled with transparency to ensure minimal disruption for the broader developer community that relies on these tools.
956 comments • Comments Link
• 大型科技公司在重新评估 "React Native vs. Native" 的利弊,有些公司认为如今依靠 Coding agents 维护独立的 Swift(iOS)和 Kotlin(Android)代码库,在经济上可行、技术上也更优。
• Coding agents 使开发者能把实现功能对等视为一个可自动化的任务,而非纯粹的人力负担,核心挑战由编写代码转向定义严格的规范、测试和审查闭环。
• 选择回归 Native 常源自想摆脱 React Native 的"upstream tax",即频繁的大幅变动、库的不稳定性,以及最终不得不"drop into native"以解决性能瓶颈。
• 人们特别担心长期的"divergence cost",因为功能对等不仅是初次实现,还要求多年内在行为、边缘情况和不断演进的操作系统特性上保持一致。
• 也有人指出,用来构建 Native 应用的同类 AI agents 同样可以改善 React Native 的开发体验,这暗示迁移可能更多源于对框架的疲惫,而非绝对的技术必要性。
• 依赖第三方 coding models 带来一种新的战略依赖:用对未来模型成本、可用性和知识产权保护的不确定性,替代了以往对框架的依赖。
• "vibe-coding"(在缺乏充分人工审查下生成应用)引发激烈争论,资深工程师警告这容易引入静默错误、竞态条件和维护债务,一旦 AI 原始生成的上下文丢失,很少有人能理解或修复这些债务。
• 对于小公司或资源受限的团队,React Native 或其他跨平台框架通常仍更务实,因为它们能在不构建复杂 agentic 基础设施来同步多条 Native 技术栈的情况下,提供更高的杠杆。
• 与其纠结于框架本身,架构设计变得更为关键,尤其是把业务逻辑与 UI 分离,这既利于测试,也让 AI agents 更容易通过 CLI 操作代码库。
• 争论的焦点在于这是否可持续:这是长期的工程策略转变,还是由廉价 token 的短期可用性和管理层对 greenfield 项目的偏好所推动的潮流?
向 Native 回归反映了一种更广泛的转型:AI agents 降低了代码生成与维护的成本,使组织能够优先考虑特定平台的性能与稳定性,而不再一味追求过去十年盛行的 "write once, run anywhere"。尽管资源充足的大型组织押注于 agentic workflows 来自动化多栈功能对等的维护负担,批评者警告这种做法会忽视分歧带来的复合成本,以及缺乏人工监督的 AI 生成代码潜藏的风险。总体而言,行业正在质疑跨平台抽象是扩展的唯一路径,这可能预示着像 Electron 和 React Native 这样的臃肿生态有被边缘化的风险,前提是技术架构和测试框架足够稳健,能够支持自动化的长期维护。 • Large tech companies are re-evaluating the "React Native vs. Native" tradeoff, with some concluding that coding agents now make maintaining separate Swift (iOS) and Kotlin (Android) codebases economically viable and technically superior.
• Coding agents allow developers to treat feature parity as an automation problem rather than a manual labor burden, shifting the primary challenge from writing code to defining rigid specifications, tests, and review loops.
• The decision to move back to native is often driven by a desire to escape the "upstream tax" of React Native—specifically, dealing with frequent breaking changes, library instability, and performance bottlenecks that require "dropping into native" anyway.
• A significant concern is the "divergence cost" over time, as feature parity involves more than just initial implementation; it requires maintaining consistent behavior across analytics, edge cases, and evolving OS platform features over years.
• Some argue that the same AI agents used to build native apps could just as easily improve the React Native experience, suggesting that this migration might be more about framework fatigue than an absolute technical mandate.
• Relying on third-party coding models creates a new form of strategic dependency, replacing old framework dependencies with uncertainty regarding future model costs, availability, and intellectual property protection.
• The "vibe-coding" approach—generating apps without full manual review—is heavily contested, with experienced engineers warning that it risks introducing silent bugs, race conditions, and maintenance debt that few developers will understand once the original AI-generated context is lost.
• For smaller companies or resource-constrained teams, React Native or other cross-platform frameworks often remain the more pragmatic choice, as they provide high leverage without requiring the sophisticated agentic infrastructure needed to keep multiple native stacks in sync.
• Architecture is becoming more critical than the choice of framework, specifically the move toward isolating business logic from UI, which allows for better testing and makes it easier for AI agents to operate on the codebase via CLI.
• There is significant skepticism regarding whether this shift is a sustainable long-term engineering strategy or merely a trend fueled by temporary access to cheap tokens and management's preference for "greenfield" projects over tedious maintenance.
The shift back to native development reflects a broader transition where AI agents lower the cost of code generation, allowing organizations to prioritize platform-specific performance and stability over the "write once, run anywhere" efficiency of the previous decade. While large organizations with sufficient resources are betting that agentic workflows can automate the burden of maintaining feature parity across multiple stacks, critics warn that this strategy ignores the compounding costs of divergence and the hidden risks of AI-generated code that lacks human oversight. Ultimately, the industry is moving away from the assumption that cross-platform abstraction is the only way to scale, signaling a potential decline for bloated ecosystems like Electron and React Native in favor of native implementation, provided that technical architecture and testing frameworks are sufficiently robust to support automated maintenance.