5 ms·
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
by anon9001 7y ago
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 developers are cheap to hire, and they don't need to know any objc/swift/java/kotlin to build the product.
Our product is consistent, because it's the same code across platforms. The business people paying us to build the app are thrilled at how quickly we can turn around features.
We've been shipping this way for 2 years and I would strongly recommend it to everyone.
Also, before people jump in with "But RN is slow and bloated!", it's actually not. The performance is just as good as truly native and the binary is small. The real downside is having the app not feel native, but only developers seem to notice. Pragmatically, most apps are so bad that if your Android app has an iOS look-and-feel nobody seems to care.
- wdb 7y agoDon't know last time I tried React Native and wanted to use some cool feature of iOS. I either had to write my own RN plugin in Swift/ObjC or wait for someone else to do it.
- npo9 7y agoYou say that like writing plugins is hard or undesirable.
- harrisonjackson 7y agoExactly - this is native code that would need to be written either way, right?
- freehunter 7y agoThat's what I don't understand when people criticize frameworks like React Native... "I didn't like that I had to build 15% of the app in native code, so I ditched RN and now have to write 100% of the app in native code, but twice and in two different languages"?
- tilolebo 7y agoReact Native isn't the only abstraction out there. You could use Flutter, Ionic or similar. Or do they have the same issue?
- anon9001 7y agoThey all have the same issues, but RN has the largest community.
- davidwparker 7y agoFlutter has a larger number of "star" on Github. It also has more issues and more pull requests. React Native has 3x more followers on Reddit. So I guess it depends on your definition of community.
- s_y_n_t_a_x 7y agoFlutter is only in beta for desktop and web. And it's emulated UI, not true native UI. RN is ready now and today for all platforms, including Window via react-native-windows. Microsoft is choosing React, I wouldn't go w/ Flutter. Why would you choose a Google only language and framework... unless you like rewriting code when it dies. Also, w/ React you can use TypeScript or JS, you don't have to learn a new language. From my perspective, it looks like Google pays a lot of money for these tech articles and stars, it's not a really good way to look at things. There's always a Flutter campaign going on.
- greatjack613 7y agoAs much as I hate that google kills stuff often, the above comment is missing the fact that facebook also kills stuff often, they just never had any adoption in the first place so you don't notice
- s_y_n_t_a_x 7y ago
- seanalltogether 7y ago> JavaScript developers are cheap to hire, and they don't need to know any objc/swift/java/kotlin to build the product. OP is pretty much saying that.
- neurostimulant 7y agoIt's actually not too bad. You don't even have to put those native code as a separate plugin. You can simply add the native code directly to the generated ios/android project like you do a native app.
- misiti3780 7y agoexpo is taking care of this, not there yet, but getting better every day.
- rhodysurf 7y agoThats a benefit of React Native though. Share as much code as possible and write wrappers for the Native features you need for your project. I really love the model.
- baron816 7y ago> JS can be awkward and confusing. > JavaScript developers are cheap to hire There’s your problem. Go hire JS devs that know what they’re doing.
- anon9001 7y agoMy 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.
- acpacp 7y agoGood luck with that kind of project.
- anon9001 7y agoThanks. 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.
- deleted 7y ago[deleted]
- Scarbutt 7y agoHiring good devs doesn't make JS less stupid, you have to recur to third party stuff like lodash and https://github.com/inspect-js https://github.com/inspect-js to keep it tolerable.
- merrvk 7y agoPretty similar experience here. The rate at which we've been able to get features out the door has doubled since we switch from native.
- ksec 7y ago>Pragmatically, most apps are so bad that if your Android app has an iOS look-and-feel nobody seems to care. Yes, but I not so sure if it works the other way round.
- kerbs 7y ago> with 3 developers There is a fairly large chasm between a small team and a Shopify, AirBnB, or Udacity. These companies have dozens-if-not-hundreds of developers piling on complexity. These companies don't necessarily feel the pain of building on somebody else's sand on day 1 or day 100, but on day 1000. This is what AirBnB and Udacity ultimately discovered.
- throwaway55554 7y agoIs there an impact on battery vs true native?
- fingerlocks 7y ago> 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 you expect anything but the most basic, ugly CRUD app from a JS dev. I have tried many times to assign "just" the cross-platform code to a javascript person and it never works. What do you do when there are native build errors? Xcode needs to be upgraded, or parts of your RN modules are deprecated? Gradle files need to be actively maintained. There are features and UI behaviors that are difficult to grok without some background on the individual platforms (e.g., push-notifications). There's also combinations of packages that can break your app- "react-native-sound" and "react-native-audio", the sound and microphone packages respectively, modify the same singleton on iOS. Adjusting settings in one breaks the behavior in the other! How could a JS dev possibly hope to solve something like that?
- anon9001 7y agoI'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.
- fingerlocks 7y ago
- nimrody 7y agoI'm sure Shopify has way more than 3 developers working on their mobile apps. They can certainly afford to have separate teams doing web, iOS and Android development and optimize for each environment.
- crystaldev 7y ago> 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. This can't be understated. You can always tell when you've opened a React-Native (or similar "portable") app. It always feels like shit.
- anon9001 7y ago> It always feels like shit. Yeah, it does, to developers only. They're not the target market. I used to lobby for my employer to care about the latest iOS feature or fight over what the HIG advises is best practice. Unfortunately, most business would be perfectly happy if they could have a designer draw a pretty looking app and have it magically pop into existence. Platform features are an afterthought, if a thought at all. I'm not thrilled with the state of the app industry, but it is what it is. The really elegant solution is to have a passionate team of platform-specific developers pushing the boundaries of what's possible on a mobile device, constantly using the latest features and profiling for battery usage and network usage. Ideally a team that does this would be so proud of the code that it becomes open source to serve as an exemplary model of software engineering actualized. I know what's "right", but I also know what the market wants. The market wants me to churn out cross-platform CRUD apps as quickly and cheaply as possible.
- deleted 7y ago[deleted]
- rhlsthrm 7y agoInstagram is React Native right? I wouldn't say it feels like shit.
- hstreet 7y agoInstagram is only react native in something like 20% of the app. I think it's comments or something, but I remember it was blogged somewhere. The rest is native.