Live data from Hacker News

Shopify is moving from React Native back to Swift and Kotlin

shopify.engineering

541–550 of 962 posts

Re: Shopify is moving from React Native back to Swift and Kotlin

#541
post #511

I wonder why not Kotlin Multiplatform. I’ve been using LLMs to build with KMP for about 10 months and it’s a delight and you can use native Swift UI when you want to. It seems to be the best of all worlds.

I've been out of the app world for ages, always liked kotlin. Can you speak more about multiplatform?

Well the thing is that the server code is basically Java, and the only bad thing about Java is writing it but since I don’t have to write it, it’s actually a really solid option. Then you have shared UI (don’t use WASM for web though it’s terrible, I use React for the web frontend) but you can switch to some or all native components when you need to on any platform. So for example I needed native components for secure storage and passkeys and did that by mixing in some swift on iOS and using a JNI native bridge on macOS and Windows.

I created a standardised bootstrap for all our projects here starting from the KMP wizard:

https://bitbucket.org/workingsoftware/kmpbootstrap/src/main/

The reason it the bootstrap has all platforms included is that adding in iOS, android and desktop after you have already created the project is a bit of a hassle compared with just always having the same structure even if you only want to use web.

Then you can easily add on native apps later if you like.

Re: Shopify is moving from React Native back to Swift and Kotlin

#542
AI dramatically reduces the cost of writing code (especially when you have a reference), so the scale between native and cross-platform is going to tilt more towards native now compared to before.

But I'm curious what their update will be in a year or two. Because these costs don't reduce as dramatically with AI (unless you fully give up control and vibe code it):

1. Reading code

2. Manually testing code

Re: Shopify is moving from React Native back to Swift and Kotlin

#543
post #542

AI dramatically reduces the cost of writing code (especially when you have a reference), so the scale between native and cross-platform is going to tilt more towards native now compared to before. But I'm curious what their update will be in a year or two. Because these costs don't reduce as dramatically with AI (unless you fully give up control and vibe code it): 1. Reading code 2. Manually testing code

1. AI will read the code

2. AI will manually test code

Re: Shopify is moving from React Native back to Swift and Kotlin

#544
I agree with this but not just React, React-Native. There's many libraries I no longer have a need for. I've made several JS 3d apps just asking the LLM to write the 3D code from scratch. AFAICT they usually shed 2meg of library and run 1.5x to 3x faster as the LLM will do the optimal thing for the situation.

Re: Shopify is moving from React Native back to Swift and Kotlin

#545

We don’t hold on to a decision just because it was successful at the time. When a core assumption changes, we’re willing to go back and ask whether it’s still the right call. LLMs changed one of the core assumptions behind our 2020 decision, so we reevaluated our mobile stack from first principles. What we found led us back to native.

They created a mess in 2020 and hopped on over to a job at FAANG and now a fresh batch of Waterloo graduates want to do the same - maintaining somebody else's turds is beneath a Waterloo graduate on his way to becoming a manager who never touches code ever again :) So it goes.

Yeah. No way we’re getting the full story. It probably goes something like this… we lost native engineers when we switched to React then we lost the engineers that were supporting react recently and won’t be replacing them because stock market. Therefore we’ll switch back to native and go with under skilled engineers using llms. This will work until we have a code base model collapse

Re: Shopify is moving from React Native back to Swift and Kotlin

#546
post #404

Earlier quoted context omitted.

This is a great point that I wish the Shopify article went into in more depth! Would love to hear if they considered this

I believe they have a more in-depth posting that talks about it https://shopify.engineering/shop-app-migration

The blog post doesn't mention the personnel-related challenges with having two native platform teams working on the app.

The post DOES give more information as to why they looked at switching from React Native to native Platform APIs.

React Native is forcing a major refactor of React Native apps in switching to the React Native "New Architecture" (see https://reactnative.dev/architecture/landing-page).

So if Shopify had to do major refactors of all their React Native apps, maybe they could look at what it would take to go back to native Platform APIs.

from https://shopify.engineering/shop-app-migration

  For the Shop App, this coincided with our next major React Native investment: adopting the New Architecture. That work would have required us to revisit native module integrations, rendering, and the boundaries between shared and platform-specific code. Before committing to this investment, we tested whether coding agents could help us build directly in SwiftUI and Jetpack Compose while keeping product behavior aligned across platforms.

The result of that native platform APIs side project involving six devs converting the app's major user workflows?

- startup time reduced: iOS by 23%, Android by 50%

- crashes - 10x reduction

- app size - iOS increased by 1MB (67MB -> 68MB), Android reduced by 109MB (37.2%)

- build time - Android release build time fell ~75%.

- runtime perf - Android builds could draw at 120fps while scrolling feed and switching screens

Re: Shopify is moving from React Native back to Swift and Kotlin

#547
post #537

Earlier quoted context omitted.

Shopify is moving its mobile apps from React Native back to native Swift and Kotlin. With the main cost of native gone, the benefits of staying close to platform APIs and first-party tooling win out. This has been my ethos. That native is better than shared.

Your argument was you've argued your whole career for native. The article argues only very recently the cost equation has changed. Your argument reads like you are not taking into account the broader context or the passage of time.

I'll put it this way, my argument was pro native. And in the context of the article, if a large company had unlimited resources, they would choose native. I'm not discussing the business case for it, but the end result of it being the better option. It can be seen as "Shopify tried Reactive Native and left it behind the second they could after sinking resources into it for 6 years".

Re: Shopify is moving from React Native back to Swift and Kotlin

#548

I agree w/ advising people to move off React Native, though I think the story that "LLM enabled an otherwise too-expensive migration to consider" is not correct. I say this because I was part of a migration from a mid-size React Native app to a Swift/Kotlin native app redo. I did the majority of the technical work on it. The majority of the work occurred before January 2026 and without LLM code assistance, though lat…

I experienced the same issues but went the other way and migrated from React Native to React. Still one codebase but none of the issues. Performance was better too even though half the code stayed the same.

Re: Shopify is moving from React Native back to Swift and Kotlin

#549
The move to native makes sense.

Also, human developers and AI make different types of mistakes, and take different approaches to debugging. I'm not saying they shouldn't have done that, it's just that a more human-involved approach with AI filling the gaps would probably be a saner bet than 90% AI with some human interference.

Here's an example of why:

https://blog.coredump.cx/p/recursion-into-madness

Re: Shopify is moving from React Native back to Swift and Kotlin

#550
post #458

Earlier quoted context omitted.

What specifically are the ux differences?

I don't know iOS so I can't say, but a good UX does depend in part on platform expectations and every system historically been different. The compromises mean the each have good reason for what they do (sometimes anyway), but switching is hard.

I've used both in the past 2 years and can tell you these particular systems aren't meaningfully different in any way that affects third party apps.
Post reply on HN