Live data from Hacker News

Discord Switching to React Native for Android App

discord.com

41–50 of 82 posts

Re: Discord Switching to React Native for Android App

#41
I'm pretty convinced RN is only really a thing because it gives PMs/managers some good promo material about how they lead a team to "switching to a shared cross-platform codebase". They then end up using that to switch jobs/companies before they have to deal with the long-term fallout of making the switch to RN.

My company recently switched both our Android and iOS apps over from native to RN. The RN promoters promised all sorts of benefits about sharing code between platforms and how the performance would be as good as native, and how the UI would look like native, and none of that actually materialized:

- In the end, RN code is only something like 20% of our Android app. They weren't able to just "write once" and run on both.

- Instead of having 2 teams, an iOS and Android, now we have 3 teams, iOS native, Android native, and RN. And the RN team is split between iOS and Android. All sorts of additional complexity now.

- We still need a fully staffed Android specific team for everything that couldn't be done in RN.

- The performance difference vs. a native app is blatantly obvious.

- Now we just have organizational problems as the app has multiple teams/languages involved, different parts of the app are owned by different teams and manager chains, rather than just one team of people that own making a good app. RN teams can dynamically push code changes to production apps and we no longer have deterministic, reproducible builds.

- Now we have morale issues from the discontent from the team members that want nothing to do with RN.

- The UI, even though it's supposed to use native controls, just does not look and feel like native apps, there's so many little things that are strange/different.

- Our codebase is now dependent on a 3rd party platform and on a language that completely differs from how Google says that Android apps should be built. Why wouldn't we just build Android apps the way the Android team says we should? Is there going to be long term support for RN/JS?

Re: Discord Switching to React Native for Android App

#42
post #18

I hope desktop apps can soon start switching from Electron to React Native.

On the desktop I don't think there's much value in it. Electron is much more compatible with the web, requires less platform specific work, and doesn't really come at a significant performance or UX cost.

Electron doesn't really come at a significant performance cost?

I wonder why Rockstar or Bethesda don't just use electron for their games.

Re: Discord Switching to React Native for Android App

#43
post #12

https://twitter.com/sandofsky/status/1554178071820771328?s=2...

I've been using the iOS RN app for years (on a phone that's currently 4 years old) and never had any performance issues. There may just be some transition pains they need to work through on Android

It's worth noting that even a cheap, used 3-year-old iPhone 11 [0] is faster in benchmarks than a new flagship Samsung S22 Ultra [1], and the disparity is much larger when comparing flagships of the same generation head-to-head. This is no excuse for slow software, but it does go some way towards explaining the speed of the iOS app.

[0]: https://browser.geekbench.com/ios_devices/iphone-11 [1]: https://browser.geekbench.com/android_devices/samsung-sm-s90...

Re: Discord Switching to React Native for Android App

#45
post #38

Lot of people here don't know what React Native actually is

There is still a _desperate_ need for a widely used common standard for GUI; I'd even be OK with that happening to be 'things are webpages' if they were OS native and would otherwise behave similarly to native apps on every platform. That HTML5 desktop or even Postscript would be nice; anything as long as it's a real standard already installed and kept up to date on 99% of potential user's systems.

> as long as it's a real standard already installed and kept up to date on 99% of potential user's systems.

Unfortunately, by far the closest thing we have to this is Google Chrome.

Re: Discord Switching to React Native for Android App

#46

I hope desktop apps can soon start switching from Electron to React Native.

I'm skeptical that this makes business sense for most companies. Most electron apps feel like they're just checking off a box, rather than crafting any sort of quality desktop experience. If you don't care, why not just slap your website in a webview? Way easier than trying to hire or train developers in a niche technology.

>> why not just slap your website in a webview

Because safari sucks and that makes webview suck too. It's like asking why people don't use ie6 for web apps.

Re: Discord Switching to React Native for Android App

#47
I had to uninstall the discord app for my Core i5 Windows PC because it would randomly peg the CPU at 100% and become mostly unresponsive (several seconds to register keystrokes...). Now it's only a web tab I load when I need to.

I was relying on the Android app for notifications... but if it's now becoming as bad as the Windows and the Web apps, that's going to be an issue. I can't uninstall it from everywhere, not a messaging app.

Re: Discord Switching to React Native for Android App

#48

I'm pretty convinced RN is only really a thing because it gives PMs/managers some good promo material about how they lead a team to "switching to a shared cross-platform codebase". They then end up using that to switch jobs/companies before they have to deal with the long-term fallout of making the switch to RN. My company recently switched both our Android and iOS apps over from native to RN. The RN promoters promis…

> Instead of having 2 teams, an iOS and Android, now we have 3 teams, iOS native, Android native, and RN. And the RN team is split between iOS and Android. All sorts of additional complexity now.

This is exactly where we were going with our RN skunkworks project before it was axed and rewritten fully in native. however in our case we had about 100 native screens on both platforms written in swift/java that upper management did not want to spend time rewriting to RN, so it kind of forced our hand back to native to stay sane.

Re: Discord Switching to React Native for Android App

#49

I'm pretty convinced RN is only really a thing because it gives PMs/managers some good promo material about how they lead a team to "switching to a shared cross-platform codebase". They then end up using that to switch jobs/companies before they have to deal with the long-term fallout of making the switch to RN. My company recently switched both our Android and iOS apps over from native to RN. The RN promoters promis…

Counter-anecdote from my company, which also ships a RN app on both platforms:

> The RN promoters promised all sorts of benefits about sharing code between platforms and how the performance would be as good as native, and how the UI would look like native, and none of that actually materialized

We've pretty much seen all of this materialize. Our native apps perform great, look great, feel native. There's a tiny bit of platform-specific code around the edges, mostly for integrations with third party libraries. But 90+% of our code is shared, idiomatic React code, and mostly only the team lead ever has to dig beneath that. The whole team for both apps together is around 10 people, and most of them never have to step outside of JS. They also have an easy time making changes in our React web app (and the web team has an easy time making changes in RN) because the skillsets largely overlap.

> RN teams can dynamically push code changes to production apps and we no longer have deterministic, reproducible builds

Ok- but nothing about RN forces you to use the dynamic code push feature. In fact, we just decided as an org that we wanted to reduce our usage of it. This sounds like an organizational issue.

I have to ask, what kind of app were y'all building? I could see this varying widely based on that. Ours is a fairly straightforward finance app

Re: Discord Switching to React Native for Android App

#50

Earlier quoted context omitted.

I'm skeptical that this makes business sense for most companies. Most electron apps feel like they're just checking off a box, rather than crafting any sort of quality desktop experience. If you don't care, why not just slap your website in a webview? Way easier than trying to hire or train developers in a niche technology.

>> why not just slap your website in a webview Because safari sucks and that makes webview suck too. It's like asking why people don't use ie6 for web apps.

Hence why they just bundle a copy of Chromium in Electron.
Post reply on HN