Live data from Hacker News

Building all of our new mobile apps using React Native

engineering.shopify.com

291–300 of 588 posts

Re: Building all of our new mobile apps using React Native

#291

Shopify is right to use React Native. I build an app with React Native Web and we produce Android/iOS/web from the same code base with 3 developers. No, it's not perfect. Yes, JS can be awkward and confusing. Yes, a truly native app built by expert platform-specific developers would be better. But I'm able to ship this product with less than half the team size I would need for native development. JavaScript developer…

> they don't need to know any objc/swift/java/kotlin to build the product. I have a hard time believing this, and I've been making apps on both platforms for >10 years. And I love react-native. My latest day job is basically forking popular react-native packages, often rewriting them in Swift, fixing numerous bugs, and adding features specific for our company. And all this experience has taught me that in no way can…

I've only had to dive into the native code a handful of times, but I do basically make an ugly CRUD app. Most apps are ugly CRUD apps though. I haven't used the Shopify app, but it probably falls into that category too.

> What do you do when there are native build errors?

I periodically do suffer through xcode upgrades, bad RN module linking, gradle issues, etc, but it's a couple of days of work every few months to say current. The JS devs don't really have to think about this stuff for the daily work. I think it's totally possible to get away with one person that knows how to do the hard technical stuff when it crops up.

That said, I don't build the most technically sophisticated product. The vast majority of changes we make are for design/marketing or for features that build on what we already have. I think that's true of most apps.

It's not for everything, and I'm glad Firefox (for example) does do native Android development. I couldn't imagine that working with React Native. But look at the apps on any random phone and the ones that couldn't be made in RN is pretty small.

Re: Building all of our new mobile apps using React Native

#292

Honestly I think the future of mobile will just be... mobile websites. What's missing until regular websites have parity with mobile apps in functionality? - Accelerometer and all sensor support (some of these are already supported on various browsers on various OSes) - Background support - Bluetooth - WiFi - Better notifications - etc. Sure there will always be a need for native, but 99% of apps don't need any of th…

One thing I feel is overlooked in these discussions is WebView UI performance isn’t as good as native. You’ll always notice a difference scrolling a list natively vs on web. It just _feels_ different, same goes for all the other micro-interactions if pushing/popping views.

This. And if you compare it with the very best say, iOS has to offer in touch interaction it's just different worlds. Look at the multitasking and swipe interaction on an iPad pro at 120Hz. You just can't even think of that world.

I have a funny feeling that Apple's next big developer move on the iPhone is to enable those types of smooth, cancelable interactions out of the box in Xcode via new SwiftUI components just for it. When they make it easy and clear, people will use it and then the gap will widen.

Re: Building all of our new mobile apps using React Native

#293

I thought the cool thing to do was declare React Native dead for your org, not the new hotness?!? I try to re-evaluate my opinion of the mobile ecosystem monthly, and would love to know how people agree / disagree with my rankings: 1. Just make a web page 2. Native iOS & Android 3. Flutter 4. Some ordering of remaining cross-platform tools depending on requirements. (React Native, Vue Native, Xamarin, Ionic, Titanium…

> 1. Just make a web page This is 100% reasonable for a lot of apps. I for instance uses the web version of Gmail on my phone without any issue, and Gmail is a complicated app. Trade-off: not easily discoverable in the store of the platform, harder to test because of browser differences, might not be as fast as a native app from a UI perspective. > 2. If your app involves persistant storage and functions that are not…

I don't know flutter because I don't know Dart.

I don't fully understand this opinion. Learning "new" things can be difficult, but there's little "new" in dart compared to other languages. Maybe you can elaborate?

Installing required tools, setting up a project, including debugger, is just damn easy (VSCode extension FTW). Also, any prior experience in mobile using Kotlin, Swift, or JS, translates well to Flutter and therefore Dart. Bonus knowledge bridge for people with MVVM experience due to first class async Streams API and third party RxDart (following ReactiveX spec).

Re: Building all of our new mobile apps using React Native

#294
post #90

Earlier quoted context omitted.

Not just smoother, native apps done right are interactive at the visual element level.

Can you elaborate on this? I’m not following.

Native iOS developer here (10 years). Knowing how to leverage UIKit and CoreAnimation properly can give a very smooth UX. SwiftUI has significantly upped the ante on iOS13 and future versions; it's reactive without the middleware layers, and it lets you get your app done (with live view previews) and not have to drag in a pant-load of external frameworks.

Re: Building all of our new mobile apps using React Native

#295

I'm surprised no one is mentioning this: "At the beginning of 2019, we did a 6-week experiment on our flagship Point of Sale (POS) app to see if it would be a good candidate for a rewrite in React Native. We learned a lot, including that our retail merchants expect almost 2x the responsiveness in our POS due to the muscle memory of using our app while also talking to customers. In order to best serve our retail merch…

Isn't the vast majority of their POS systems iOS based? The base iPad is rather fast. Why not just target your market directly and max out performance? Meanwhile the vast majority of their Android POS systems use what, lower end Kindles and such? They know they can't get perfect experience there but they don't want a bad one where it counts. They know their market.

Re: Building all of our new mobile apps using React Native

#296
post #280

Earlier quoted context omitted.

It strikes me that, more than anything, it is the lack of an efficient "Add to Home Screen" flow, that has doomed mobile websites. ...and it's intentional. By having an app store, mobile OS distributors know that they have control over a massive revenue stream.

A good part of it is their absolutely massive 30% cut. The only reason they get away with it is that when Apple's app store first came out, most of the online casual applications were games. Hosted by a few gargantuan aggregators ( cough newgrounds cough ) who charged 70%+ of the revenue for their ... service. Against a backdrop of above-criminal-rates extortion, 30% must have looked like a bargain. To put these numb…

Forgive me a bit, since I haven't been on Newgrounds since before the iPhone came out, but did Newgrounds ever charge to host on their site? Did they allow you to monetize your games?

Re: Building all of our new mobile apps using React Native

#297
post #259

Earlier quoted context omitted.

My point is that it's not a problem. I can take someone fresh out of bootcamp with a basic understanding of react components and css and get them churning out code that works on 3 platforms.

Good luck with that kind of project.

Thanks. I've had pretty good luck so far. I would not want to be managing 3x the team size with 3 different repos to build my crappy CRUD app.

Keep in mind that I'm not trying to do anything revolutionary here. I just work for a company that needs apps on the major platforms with the least effort and expense possible.

Re: Building all of our new mobile apps using React Native

#298

Earlier quoted context omitted.

The thing is, you can rephrase: > by doing an experiment on Android while maintaining native on iOS as: > by throwing their Android users under the bus It may be a cynical take but it's not an invalid one to take when the thrust of the rest of the paragraph comes down to "the native app's performance is so good, we couldn't dream of changing it".

I don't know if you read the article or not but the title is very clearly: "React Native is the Future of Mobile at Shopify". So the Android experiment was successful.

Also, ios is “easy” when it comes to doing react-native. So by doing the hard one first, they have a lot more confidence in the rest.

Re: Building all of our new mobile apps using React Native

#299
> The first is a tooling team that helps with engineering setup, integration and deployment. The second is a foundations team that focuses on SDKs, code reuse and open source.

They have a whole team to set up tooling for React Native. I wasted many days trying to do this work on my own.

They also have a whole team for evaluating 3rd-party libraries that provide functionality missing from React Native, such as letting the user hide the keyboard on iOS. I wasted weeks on this and finally gave up on React Native and switched to Flutter.

I think React Native needs some attention from user-focused PMs and engineers before it is ready for adoption by small teams.

Re: Building all of our new mobile apps using React Native

#300

Honestly I think the future of mobile will just be... mobile websites. What's missing until regular websites have parity with mobile apps in functionality? - Accelerometer and all sensor support (some of these are already supported on various browsers on various OSes) - Background support - Bluetooth - WiFi - Better notifications - etc. Sure there will always be a need for native, but 99% of apps don't need any of th…

[deleted]
Post reply on HN