Live data from Hacker News

How Discord achieves native iOS performance with React Native

blog.discordapp.com

61–70 of 115 posts

Re: How Discord achieves native iOS performance with React Native

#61

I'm just gonna say. Great writeup and a good example case in performance optimizations. Now please make discord in windows start up faster than it takes to boot windows. That's right cold starting my computer and logging in takes less time than starting discord.

Why not just use the browser client?

Re: How Discord achieves native iOS performance with React Native

#63
post #11
post #6

Sounds like React Native causes more work then necessary. Business logic can be easily shared between different platforms, Android, macOS, Windows and iOS. Always the most time is spend to make the app behave right for each platform, so that’s only bit which differs. I am happily writing apps in Swift for Android and iOS

Watching some videos illustrating writing iOS React Native apps using Clojurescript, with REPL changes updating app display in real time (well, "live") is what makes me interested in RN. Were it not for that, I don't see why Swift is such a bad thing. I know that maintaining two separate code bases for iOS and Android is theoretically bad, but I imagine if the apps are architected well it shouldn't be such an issue.

Except that you do need to know two technologies. Part of architecting it right is also using the technologies correctly and that's extra knowledge + time + skill.

Re: How Discord achieves native iOS performance with React Native

#64
I like Discord a lot, but it's so funky. (Also, wish their support team would just send a link to allow users to file bugs.)

1) Weird issue where it reconnects you on across multiple devices. I was on my phone... then switched to computer. Phone was no longer active. About 5 minutes after I got done with the game, Discord on my phone kicked on all by itself. Phone was sitting in another room, and all of a sudden Discord chat was being broadcast. (Luckily PTT was enabled so they didn't hear me.) It shouldn't try and reconnect... once you hang up once, it should know to hang up across all devices.

2) Can't upload profile or server images more than twice before it triggers some sort of internal cooldown on uploading images. Just puts you on the same page and pops a warning, "You have unsaved changes!" but won't let you save. Quit, wait a few minutes, try again... works. Annoying when you crop something wrong and have to re-upload. It should always let you upload, or give some message, "Still sending out your last image to all users, try again in 5 minutes."

3) Can't resize Window via window manager (Magnet on MacOS). I think this is the only program I have seen that won't let me drag and snap it. Annoying.

Re: How Discord achieves native iOS performance with React Native

#66
We were considering using React Native for our task and communication app for non-desktop workforce, we even started out that way but realised how much effort we would have to put into getting things working especially since our interface is a little different and ended but ended up building native for both Android and iOS. Haven't regretted it a bit.

Re: How Discord achieves native iOS performance with React Native

#67
post #60

Earlier quoted context omitted.

Seriously, take a stab at building an app in Flutter.

Never had performance issues on scroll ? The demo app on the ios app store has lagging scroll performance for a simple app on an iphone X

I don't have any pages that scroll. =) It is all single pages for now.

That said, who knows what the demo app was done with. If there is lagging scroll performance, it could be a lot of things.

I will say that figuring out where the performance problems are would be pretty enjoyable in IDEA. The tooling there for performance is quite good.

Re: How Discord achieves native iOS performance with React Native

#68

Earlier quoted context omitted.

You are not wrong. It is a nightmare to maintain, and if you already took the leap you best keep that project updated as soon as possible or you will be fucked beyond repair. There has to be a better way to write mobile applications. Is that Ionic? I don't know.

If you’re going to remain within Apple platforms, try SwiftUi: https://developer.apple.com/tutorials/swiftui/ There may be a chance of it being adapted for other platforms in the future.

i highly doubt apple will port that to android, so unless they open source the technology...

Re: How Discord achieves native iOS performance with React Native

#69
post #16

The iOS app of Discord is crappy compared to the Android app. I mean, it's not bad bad, but it's not good, or at least not as good. I wonder why they decided to go this route instead of hiring iOS developers? I could understand if they used the same app for both platforms (like they do with their Electron app, which is also not as good as Ripcord), but since they have a native app for Android...

Reduce your Apple footprint?

I try to stay away from that company as much as I can, but since users unfortunately use that company.

Re: How Discord achieves native iOS performance with React Native

#70

We were considering using React Native for our task and communication app for non-desktop workforce, we even started out that way but realised how much effort we would have to put into getting things working especially since our interface is a little different and ended but ended up building native for both Android and iOS. Haven't regretted it a bit.

the cross platform dream is so appealing and I've used Ionic off and on for years because of it. At the end of each project I say to myself "never again, i will just learn Swift" ( i already know java ). Then, slowly but steadily, the cross platform dream takes root and blossoms. Off I go with the latest Ionic and "this time it will be different".
Post reply on HN