Live data from Hacker News

Shopify is moving from React Native back to Swift and Kotlin

shopify.engineering

71–80 of 962 posts

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

#71
post #31

We did the same thing - had 90% of it overnight. Then spent a few days in the background tweaking for polish. Our app is smaller, and has about 15-20 screens. I started at about 12:30am by giving codex a goal and it inventoried every screen based on the react native code, then created android and iOS directories, used maestro (I had already set up this tooling for a previous personal app build a few weeks prior), and…

[flagged]

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

#72
post #3

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.

I suspect we'll see a lot of large orgs doing this in the next year.

Definitely makes sense for a large org with massive resources (such as Shopify) to do this. But for everyone here pondering what to use for their startup or a smaller project, there are still important trade-offs. In the past few years I've launched multiple cross-platform Flutter apps and multiple native iOS and Android apps using Jumpstart iOS and Android (native templates from the GoRails guys which leverage web views from your Jumpstart Rails server). The latter gave me web, iOS and Android out of the box and was vastly less costly to build, even with AI. For entrepreneurs who like Ruby on Rails, Jumpstart is my favorite for launching rapidly, and since the mobile apps are easy-to-modify iOS and Android projects, it's designed so you can either add more custom Hotwire Native Bridge Components or just write Swift and Kotlin to replace functionality with native code. Eventually you could write away all of the Jumpstart webview stuff, but you'd only do that if you had more runway, like if you have plenty of time or you start making lots of money. I've worked for clients whose ideas failed--not because of my code, of course. :)

It's better to find out quickly if you can get traction rather than building something requiring more maintenance. For most bug fixes or enhancements, you make them in the Jumpstart Rails side and they should up instantly in the mobile apps without going through app review again! Most projects are not being built in companies the size of Shopify, so I caution anyone who wants to just get the project out there to use platforms that give them more leverage. And no, I'm still not a fan of low-code or no-code, because I know what it's like to have to maintain apps over many years.

Oh, and I still always warn clients to stay away from native mobile unless they absolutely need it, because even with AI, maintaining just a web app is still light years faster, and far more pleasant. I know from very, very, very recent experience that testing subscriptions is still annoyingly cumbersome in the flaky Apple and Google sandbox environments, and Stripe for web apps is night and day easier to test. Testing on mobile is better than it used to be, but sometimes when I'm waiting for builds onto a physical device or for confusing settings in App Store Connect or Google Play Console to take effect (or just fine where they've been moved to), I think about how a manager 20 years ago was telling me how slowly his development lifecycle was when he used to burn software onto ROM chips. So web is still the way to go, and native mobile only if you absolutely have to. And if you have tons of time or money, sure, start with plain native.

Edit: As a web developer for decades, I still find both Jumpstart iOS/Android and Flutter to be preferable to React Native.

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

#74

Earlier quoted context omitted.

And people say AI isn't taking SWE jobs...

This is an incredibly boring task. Nothing new, just rewrite everything to just see it all rewritten again in 1 year. Perfect for LLMs and something humans shouldn't do.

> This is an incredibly boring task.

We all want super exciting jobs. But plenty have boring jobs like this. Between not having a job or having a boring job that pays well, the choice is obvious for many of us.

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

#76

If you put every company that needs/has an app on a spectrum, there is a line somewhere that roughly divides them into two groups: where Electron/React Native/etc. makes sense or not. It's just a normal engineering decision: solving problems given limited resources. Companies have different problems and different resources. I think people in the tech community have probably also noticed that it's rather popular to ha…

Using cross-platform web technology is absolutely a nuanced engineering decision that is the right one for many businesses. What is categorically bad is bundling a standalone browser runtime for every single service, wasting user’s storage and memory when you could just have a website in a browser. Is there any major browser now that doesn’t support saving websites as apps? Electron is simply a suboptimal and incorre…

Is everyone wrong, or is there more to it than you can see from where you stand?

I don't want to spend much time on this comment so I risk not making a sufficient point, but something I notice is that you're appraising the situation from a purely technical point of view. The technical component is just one piece of what makes a whole product. I think Apple is probably a good example: they regularly make decisions that bother the hell out of tech-centered minds.

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

#77
post #31

We did the same thing - had 90% of it overnight. Then spent a few days in the background tweaking for polish. Our app is smaller, and has about 15-20 screens. I started at about 12:30am by giving codex a goal and it inventoried every screen based on the react native code, then created android and iOS directories, used maestro (I had already set up this tooling for a previous personal app build a few weeks prior), and…

And there's no proprietary IP in your company's app that you don't mind being sucked up into the training data?

As other have mentioned, the code isn't the valuable part. But also there are alternatives now to these LLM providers.

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

#78
post #23

Earlier quoted context omitted.

Perhaps. I can absolutely see that being more attractive especially with things like the Duo where, I assume, SwiftUI gives you a number of things "for free". That said, the massive downsides to native are: - App Store Review time, this used to be hours to 1-2 days, now it can take a week or more - In the same vein, you can do updates without waiting on native when using web technologies to build your app. We can go…

Your assumptions are very outdated. App Store review times are typically < 24 hours and have been for the last couple of years. And KMP makes cross-platform a real thing now, rather than hacking a web view into a native shell, which was always the worst possible user experience.

Doesn't KMP assume your team is comfortable working in Kotlin?

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

#79

The wheel of fashion turns once more.

I don't think its purely fashion here. React Native always incurred a bit of a performance & UX penalty, but many people decided that this tradeoff was worth it for the increase in product development velocity.

LLMs change the tradeoff and organizations would be remiss to not reconsider previous decisions.

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

#80
Agreed, the whole of the Javascript / TypeScript ecosystem has caused a slop hellscape of workarounds, half-backed fixes and have exposed short-comings in the ecosystem.

Perhaps these languages do not work well as they are not designed to run efficiently on mobile devices. Now that we have libraries such as SwiftUI and Jetpack Compose, React Native no longer makes sense to use.

Now we should also move away from Electron to better alternatives such as Kotlin Multi-Platform or fully native libraries on each platform; because of LLMs.

Post reply on HN