8 ms·
Discord Switching to React Native for Android App
- bob1029 4y agoI guess good luck to them. I still don't understand why organizations this large cannot maintain a native experience that is tailored to each class of device. This fake paradise of "one app to rule them all" is absolute madness to me now.
- deleted 4y ago[deleted]
- codeptualize 4y agoBig win for React Native! I'm curious how the user feedback will be. One thing that isn't super clear in the article: Is their iOS app already on React Native? Edit: Seems like it https://discord.com/blog/how-discord-achieves-native-ios-performance-with-react-native https://discord.com/blog/how-discord-achieves-native-ios-per...
- vorpalhex 4y agoOh this makes me nervous. Discord on android is slow and bloated and occasionally memory leaky. I have a tasker routine to restart it nightly... If the app gets any laggier or slower I will probably have to abandon it...
- nawgz 4y agoIf it's already bad, isn't that a reason to be excited about the change? From what you say, it's already at the brink of unacceptable in terms of performance...
- willio58 4y agoTheir reason for switching to react native is to address these issues
- vorpalhex 4y agoThat is explicitly not their reason. They want platform parity, as they specify in the article. Moving from native to react native will almost certainly be slower (unless something in their native app is just very broken).
- akmarinov 4y agoThat’s good. Having one app be RN and one native is probably the worst thing you can do. That said, seems like Android users really dislike this update as the app seems slower, buggier and less polished than it used to be.
- robertoandred 4y agoI hope desktop apps can soon start switching from Electron to React Native.
- sandofsky 4y agoI'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.
- thefounder 4y ago>> 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.
- sandofsky 4y agoHence why they just bundle a copy of Chromium in Electron.
- rstat1 4y agoI would prefer something actually native, instead of a switch from one bad web based thing to another.
- robertoandred 4y agoReact Native isn't really web based. It draws real, native UI elements, not HTML.
- rstat1 4y agoStill a web framework though, even if the end result isn't HTML.
- douglaswlance 4y agoDo they share code between desktop and RN?
- brundolf 4y agoMy company has a RN app and a React web app. We've found there isn't much opportunity for sharing UI code; you can share hooks, data layer type stuff, etc, but the actual components aren't really compatible because the leaves of the UI tree are totally different (native elements vs HTML elements) The bigger wins come from shared tooling/skillset/headspace. Our UI devs can fairly easily jump back and forth between the two codebases
- rahimnathwani 4y agoDid you consider using React Native Web?
- brundolf 4y agoInteresting, I didn't know about that Though our web app does a lot of things the mobile app doesn't, and also benefits from things like Next.js, so I'd be a little worried about the cost/value tradeoff there for us specifically
- jrsj 4y agoI hate a lot of Electron and React Native based software, but Discord manages to avoid performance, stability, and quality issues that most seem to encounter. I don't know what they do or how they do it, but I think it's very impressive.
- deleted 4y ago[deleted]
- deleted 4y ago[deleted]
- volumetric 4y agoWe used it a lot over the pandemic and random crashes and having to restart because it started using way too many system resources was extremely common. Nobody left it open when not in active use, because it was such a resource hog. Using it on battery would take a macbook from full to 0% in like two hours flat. This was with a couple very small private groups only, no use of large public channels or anything.
- baisq 4y agoThe desktop client is, to me, not as performant as it should be. Many actions take several hundred milliseconds when it's obvious that they could be much faster.
- bravetraveler 4y ago
- lohii 4y agohttps://twitter.com/sandofsky/status/1554178071820771328?s=21&t=FUHh8l3fGPMwYKmyJ4a1GQ https://twitter.com/sandofsky/status/1554178071820771328?s=2...
- brundolf 4y agoI'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
- zlsa 4y agoIt'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 https://browser.geekbench.com/ios_devices/iphone-11 [1]: https://browser.geekbench.com/android_devices/samsung-sm-s908b https://browser.geekbench.com/android_devices/samsung-sm-s90...
- raingrove 4y agoI thought Discord is mostly webview-powered, is it not? If so, this change will make very little difference to the user.
- gruez 4y agoreact native =/= electron (and similar frameworks like CEF). The former uses native widgets. The latter uses HTML/CSS rendered by a browser layout engine.
- raingrove 4y agoI know that. I am saying that if the app is mostly webviews anyway instead of building the views natively, there would not be much difference between being a fully native app with WebViews or being an RN app with <WebView> components.
- brundolf 4y agoLot of people here don't know what React Native actually is
- mjevans 4y agoThere 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.
- zlsa 4y ago> 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.
- mjevans 4y agoI would, except it's not a 'native dialog'; it doesn't yield first class citizen UI interaction, it lives in a tab in the browser.
- viktorcode 4y agoIt should be noted that the need for standard GUI doesn’t come from the users, who mostly prefer consistency among different apps within their OS of choice.
- ramesh31 4y agoReact Native really is a game changer for mobile development. I picked it up last year to build a new iOS app for the first time since the old Objective-C/UI-Kit days. I was literally building things in minutes that would have taken hours or days of writing custom OpenGL and networking code back then. Any performance tradeoffs left at this point are worth it IMO.
- PainfullyNormal 4y agoI picked up React Native a few years ago for a project and spent a week doing nothing but fighting the build system. And then I spent another week doing the same on Android. The first question that popped into my head when I saw this headline was: Is React Native still a hot mess?
- ramesh31 4y ago>The first question that popped into my head when I saw this headline was: Is React Native still a hot mess? Expo [0] is what really makes things painless now. There's no more struggling with native binary dependency hell. And the entire App store submission process is completely managed; building, signing, uploading, and pushing a new version from your machine to Apple is just a single CLI command. [0] https://expo.dev/ https://expo.dev/ https://dev.to/mauro_codes/expo-101-building-mobile-apps-in-weeks-not-years-aj1 https://dev.to/mauro_codes/expo-101-building-mobile-apps-in-...
- cercatrova 4y agoI wonder if they considered Flutter as well, but their website is probably written in React so it makes sense to use RN as well to share relevant code.
- gorbypark 4y agoThe iOS app is RN Si makes total sense to bring android along as well.
- tuetuopay 4y agoIf it reaches the performance of the already RN iOS app, then it’s a win. I’m still rocking an iPhone 6s, on which Discord is buttery-smooth. If only the Slack app could do the same…
- baisq 4y agoYour iphone 6s is probably faster than the average android phone sold today.
- branon 4y agoKnowing little about android dev - does this affect compatibility for older android versions? current discord app works great on android 6
- bjustin 4y agoThe iOS app seems to work as well or better than the desktop app in my experience, so imagine my surprise finding out it's React Native. If the Android app will work just as well, this is good news.
- Grim-444 4y agoI'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?
- seanalltogether 4y ago> 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.
- 4y ago
- obarthelemy 4y agoI 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.
- LAC-Tech 4y agoHere's my experience with react native: - There were very little opportunities for sharing functionality between web and mobile. The standard react architecture is code-behind, and you can't share components between react and react native. - Time-consuming to update to new versions, especially on the IOS side of things. A constant avalanche of errors from the very convoluted cocoapods build system, with stack traces in multiple different languages popping up (From memory: bash, objective C, swift, ruby). Involved a deep dives into github issues. - In the end we were at least able to share some validation stuff between the web and mobile app, which was better than nothing. Full disclaimer - I was a busy tech lead, wasn't very hands on with it, and in my teams the mobile app was a secondary concern. Very curious if other people have a different experience.
- brundolf 4y agoWe've had a good experience (I've commented with more details elsewhere) I will say, I don't think sharing code between web and mobile was ever supposed to be a key advantage. As you say, there may be some small opportunities for that, but the real benefits are a) sharing code between the two mobile platforms, and b) sharing skillsets between web and mobile
- DanielHB 4y agothat was true a while ago, but react-native-web works pretty well these days. You do need to write your code react-native first though (ie your code is react-native and react-native-web adapts it to work in the web) but a lot of things are, not clunky per se, but unsolved for web. Main example is JS-based tooltips, react-native-web doesn't give you one and it doesn't make sense to do it in mobile. So you end up needing a lot of if platform === 'web' do this, way more than just supporting ios+android updating to new versions is a huge pain, I usually default to making a new project from scratch and re-introducing our custom native code. Having iOS build knowledge helps a lot
- butz 4y agoAre there any numbers? It might be interesting to compare apk size differences, performance (perceived and measurable), at least app cold startup times. What about accessibility improvements or degradation?