> In the React Native repo, we sometimes see hot issues with limited activity in response from Facebook. Lack of visibility into such a large company can bring about frustrations when so many people depend on their open source contributions.
On the other hand, it forces us to dive into the core codebase in order to figure out the problem, which admittedly one of the best ways to learn an open source platform. By understanding the React Native platform deeply, we were able to maintain a fork that fixes issues for our own use cases and reuse their core modules.
I guess that's one way to sugarcoat the fact that you're at the mercy of Facebook being timely in fixing bugs here…
This is a common gripe with a lot of open source software, but from issues I've had to track down, Facebook is downright inviting on saying if you have an issue and you know how to fix it, submit a PR and we'll merge it.
Their priorities may not align with yours, but it's not such a bad policy. If you don't like it, fork it?
Its free & open-source. You're not at anyone's mercy. You can fix it yourself if you like, pay someone else to fix it, or use a paid solution that pays its devs to maintain it.
Complaining about FB not prioritizing/fixing the particular issues that affect you the most seems a little bit insane to me. Of course they have their own priorities.
To be fair though this exists in Native land too :P but it's sometimes even worse.
EG: In Android in the past there have been bugs in core components like the `RecyclerView` (thing that renders lists) that forced us to downgrade and unlike with React - there is no option there to fork the source and make our own bug fix.
I think the point is that they took the time to ensure they're not at the mercy of Facebook.
Regardless, you're really at the mercy of _any_ maintainer of components you depend upon heavily. It's a fact of life unless you feel like building it all from scratch.
It's leagues better than what they do with some of the less popular FOSS projects they run, such as HHVM/Hack. What FB have done there has become an existential threat to some tech companies that heavily bought into Hack.
Well it’s been three years so far - we shall see :P
I know this comment is a joke but in all seriousness even if we did move away I think it would still mean we got several years of great utility out of the framework.
No tech lasts forever and it’s important to be open to change as well as being mindful to not chase the latest trend - as in all things, balance is key.
Hi all, Discord engineer here! If anyone has any questions about the post or our experience using React/React Native the team would be happy to answer them!
The post says, "it’s roughly 1.5s startup delay to load a 15mb bundle on an iPhone X."
I've seen startup latency much slower than that on my iPhone SE. In the best case, the application takes about six seconds to cold boot when I tap on a notification. Sometimes it's closer to fifteen or twenty seconds if the app sits on the "connecting" screen for a while. It's difficult to understate how much slower the app feels than everything else on my phone.
This is not related to the post but I have an honest question. I use nitro(and absolutely love it) and I'm constantly getting inquiries about how I use blobs. There are literally 5 accounts I would happily gift a nitro subscription to but dont have the option. When is discord going to allow people to gift nitro to other accounts. It's a huge potential revenue stream and something I would happily engage in if I had the chance to. Thank you for your work. I love discord.
Awesome post, and it's really impressive what you have managed to build with such a small team! Could you go into more detail regarding your problems with Android? Poor performance of touch events seems like the kind of thing that would make RN/Android unsuitable for most teams, so why does it have such widespread adoption?
Any other insights would be great, as I'm planning to start converting my web app to RN in the next months and didn't know Android would be a problem.
As a user of the iOS app it used to have some admittedly frustrating problems, but pretty much every complaint I had previously has since been fixed, huge kudos on the progress you've made!
The only thing left that really bugs me is the fact that you can't paste images from the clipboard into the message field. It's made me change my entire workflow, from copying images to saving them.
Sorry to use this as a soapbox for my pet issue, but I saw the opportunity :P
Thanks a lot for the writeup. We've been using react native for a while now at our org and while we aren't native developers, we are getting along really well.
One question that popped up in my while reading the article was would you consider doing the android app in react native if you had to start now ? Or do you still feel it lacks the coherency it has with iOS.
Why, starting I think about 30 or so days ago, does Discord start using insane amounts of CPU time when it is started on a system that doesn't have network connectivity? On a Surface 3 Pro, A newer laptop, and a desktop system I have seen this happen. It will just use 20-40% of available CPU unit networking is restored.
Not related to React/React Native, but I was wondering if there was a way to show a users online/idle/offline status through an API call or if there are plans too.
I've been using Discord's OAuth and that's been nice, but I what I'd really like is to display that status on my site.
Why on earth don't you have a separate button for emoji on iOS like you have on Android? Having to manually type :emojiname: every time is absurd. Yes, I know it shows a list when you start typing but it's still horribly cumbersome.
Why do I get feedback on discord, but not Skype for Business ? Have tried 3 different mics of different types and messing with the settings constantly. When I say feedback I mean my speaker output going as input to everyone else.
I quit Facebook lately and moved to Discord for my group chats, cause we already had the channels from gaming.
It is good, but we all have trouble with the notifications. (this has nothing to do with react native but you are here and this is a gripe). Like if you have it running on a computer it doesn't come to your phone. So we have tons of miss-communication for stuff like "yo I am drinking near your house meet-up". Discord just sits running all the time on your PC, which for most is running all the time. So I stopped using it for time sensitive messages which sucks. I would never dare use it for a "Hey I am buzzing outside your house answer". You literally have no idea where the notification for the person is going to go. FB-Messenger never had this issue.
The usual idea I hear is that React Native might be a good idea for a small company with an uncomplicated app, especially if they use the React stack on the web.
However when one grows and starts competing head to head in the App Store or Google Play with the other top social or finance or music or whatever apps, the ones who have expert teams with familiarity with the specific Android or iOS platform will pull ahead. Particularly as you can still have a (mostly) common REST API backend, base things off the same design mockups with some modifications, and so on.
This post is interesting because at the bottom, Discord is soliciting for engineers. Gabriel Peal from AirBnB came and gave a talk at our company a few weeks ago and he shared at after AirBnB published their 5 part medium series[1], they got a huge flood of mobile developer resumes.
I don't really see a problem with them doing that. I'm not even sure I'd consider it manipulative. They walk through some design decisions, talk about their codebase, at the end say "if this sounds interesting to you, think about working for us."
Just because it benefits them doesn't mean it's exploitative or bad.
What tool/service/library are you using for OTA updates? Could you share any best practices around managing the roll out (do you push to everyone, a subset, etc.)?
Hi! Not Fanghao but another Discord iOS engineer. We wrote our own library for OTA updates but React Native Code Push (https://github.com/Microsoft/react-native-code-push) is a pretty reasonable out of the box solution. Because our OTA solution is designed for hotfixing issues rather than feature releases we push to everyone, and we also have a flag that forces our users to relaunch the app if the bug is app breaking.
The core Android team is four engineers so about double in size.
This makes some sense since on Android we have to re-write most of the stores/business logic and not just UI. We have modeled the architecture similarly to things on the Desktop/iOS side so we still are able to move fast and stay lean as a team.
The Discord iOS app has millions of daily active users and 4.8 stars with over 240k ratings. This has all been accomplished with a team of two engineers!
The team - myself included - works normal eight hour days and there is no "crunch time" (other than very rarely when we have external dependencies like when we launched our Spotify integration).
As an engineer we all want to have agency and be able to make impactful decision on the products we work on. Over-hiring too quickly is often what can lead to organizational bloat and can make things get built slower.
Instead, I think it's better to grow slowly, hire great people, and only hire when it's needed. I've found that as a company, staying small has made us always ask ourselves to make tradeoffs and constantly be thinking about what are the most important and impactful things we can be working on.
It's less that it's bad (in my opinion) and more that on Android you have a much wider range of hardware to support ranging from quite new and recent, to basically ancient almost flip phone level.
I am hoping that in the future something like React Fiber (https://www.youtube.com/watch?v=aV1271hd9ew) will make its way to React Native and unlock a new level of performance.
I wonder if, one day, Discord will get around to fixing the fact that once you have more than 3 channels and get a notification in more than one, your mobile notifications do not go to "newest" they go to the "channel highest on the sidebar".
This is why I really hate tools like react native. They try and create a code symmetry and that's not unreasonable, but then they go too far and create behavioral symmetry and that's pretty much unacceptable for as wide a gulf as browser apps and mobile apps. They have such radically different use cases.
Actually, behavioral symmetry is not an issue with React Native so much as its an issue with poor UX design. Nothing about RN mandates that the apps behave similarly. That the iOS app and the desktop app look and behave similarly is simply a design choice made by the team to maintain a consistent look/feel/UX across the apps, not RN itself. We do not share Views. All Views across all the apps are custom.
However, as Discord's mobile teams grow and expand we're exploring alternative UX designs that are significantly more mobile friendly. So your feedback is heard loud and clear at HQ :)
[+] [-] saagarjha|7 years ago|reply
I guess that's one way to sugarcoat the fact that you're at the mercy of Facebook being timely in fixing bugs here…
[+] [-] nikanj|7 years ago|reply
People don't remember what it's like, praying to dear gods that Microsoft patches that IIS bug before you lose your last customers.
[+] [-] arenaninja|7 years ago|reply
Their priorities may not align with yours, but it's not such a bad policy. If you don't like it, fork it?
[+] [-] zaptheimpaler|7 years ago|reply
Complaining about FB not prioritizing/fixing the particular issues that affect you the most seems a little bit insane to me. Of course they have their own priorities.
[+] [-] mrkcsc|7 years ago|reply
EG: In Android in the past there have been bugs in core components like the `RecyclerView` (thing that renders lists) that forced us to downgrade and unlike with React - there is no option there to fork the source and make our own bug fix.
[+] [-] EpicEng|7 years ago|reply
Regardless, you're really at the mercy of _any_ maintainer of components you depend upon heavily. It's a fact of life unless you feel like building it all from scratch.
[+] [-] zebraflask|7 years ago|reply
[+] [-] beefsack|7 years ago|reply
[+] [-] golergka|7 years ago|reply
[+] [-] amelius|7 years ago|reply
[+] [-] ryanjodonnell|7 years ago|reply
[+] [-] mrkcsc|7 years ago|reply
I know this comment is a joke but in all seriousness even if we did move away I think it would still mean we got several years of great utility out of the framework.
No tech lasts forever and it’s important to be open to change as well as being mindful to not chase the latest trend - as in all things, balance is key.
[+] [-] mrkcsc|7 years ago|reply
[+] [-] nottorp|7 years ago|reply
In your defense, it's a cancer that all "modern" apps done in javascript suffer from, but still, why?
[+] [-] jamesgeck0|7 years ago|reply
I've seen startup latency much slower than that on my iPhone SE. In the best case, the application takes about six seconds to cold boot when I tap on a notification. Sometimes it's closer to fifteen or twenty seconds if the app sits on the "connecting" screen for a while. It's difficult to understate how much slower the app feels than everything else on my phone.
[+] [-] steveklabnik|7 years ago|reply
Thanks for all of your work.
[+] [-] mehblahwhatevs|7 years ago|reply
* Have you evaluated cross-platform "native-ish" alternatives? (Nativescript, Flutter, etc.)
* What does the "lack of 64-bit support" mean for Android?
[+] [-] daimyoyo|7 years ago|reply
[+] [-] superplussed|7 years ago|reply
Any other insights would be great, as I'm planning to start converting my web app to RN in the next months and didn't know Android would be a problem.
[+] [-] connorshea|7 years ago|reply
The only thing left that really bugs me is the fact that you can't paste images from the clipboard into the message field. It's made me change my entire workflow, from copying images to saving them.
Sorry to use this as a soapbox for my pet issue, but I saw the opportunity :P
[+] [-] itsyogesh|7 years ago|reply
One question that popped up in my while reading the article was would you consider doing the android app in react native if you had to start now ? Or do you still feel it lacks the coherency it has with iOS.
[+] [-] JaimeThompson|7 years ago|reply
[+] [-] Neighbor_|7 years ago|reply
I've been using Discord's OAuth and that's been nice, but I what I'd really like is to display that status on my site.
[+] [-] Nr7|7 years ago|reply
[+] [-] grawlinson|7 years ago|reply
Is this what's expected from the app?
[+] [-] abledon|7 years ago|reply
[+] [-] bulldog13|7 years ago|reply
[+] [-] nacho2sweet|7 years ago|reply
It is good, but we all have trouble with the notifications. (this has nothing to do with react native but you are here and this is a gripe). Like if you have it running on a computer it doesn't come to your phone. So we have tons of miss-communication for stuff like "yo I am drinking near your house meet-up". Discord just sits running all the time on your PC, which for most is running all the time. So I stopped using it for time sensitive messages which sucks. I would never dare use it for a "Hey I am buzzing outside your house answer". You literally have no idea where the notification for the person is going to go. FB-Messenger never had this issue.
[+] [-] Ologn|7 years ago|reply
However when one grows and starts competing head to head in the App Store or Google Play with the other top social or finance or music or whatever apps, the ones who have expert teams with familiarity with the specific Android or iOS platform will pull ahead. Particularly as you can still have a (mostly) common REST API backend, base things off the same design mockups with some modifications, and so on.
[+] [-] sandGorgon|7 years ago|reply
Would have loved to use discord at work, but in developing countries... network connectivity is not always a given.
[+] [-] joeblau|7 years ago|reply
[1] - https://medium.com/airbnb-engineering/sunsetting-react-nativ...
[+] [-] stevehawk|7 years ago|reply
* companies pitching a product by way of blog post
* companies recruiting by way of blog post
* individuals pitching a product by way of blog post
* individuals pitching themselves by way of blog post
Blog posts and TED talks are the new advertising mediums.
[+] [-] hamms|7 years ago|reply
[+] [-] britch|7 years ago|reply
Just because it benefits them doesn't mean it's exploitative or bad.
[+] [-] haney|7 years ago|reply
[+] [-] wdgz|7 years ago|reply
[+] [-] babaganoosh89|7 years ago|reply
[+] [-] mrkcsc|7 years ago|reply
This makes some sense since on Android we have to re-write most of the stores/business logic and not just UI. We have modeled the architecture similarly to things on the Desktop/iOS side so we still are able to move fast and stay lean as a team.
[+] [-] mhartl|7 years ago|reply
This is impressive.
[+] [-] oh-kumudo|7 years ago|reply
Says it all. It is all about cost.
[+] [-] mrkcsc|7 years ago|reply
The team - myself included - works normal eight hour days and there is no "crunch time" (other than very rarely when we have external dependencies like when we launched our Spotify integration).
As an engineer we all want to have agency and be able to make impactful decision on the products we work on. Over-hiring too quickly is often what can lead to organizational bloat and can make things get built slower.
Instead, I think it's better to grow slowly, hire great people, and only hire when it's needed. I've found that as a company, staying small has made us always ask ourselves to make tradeoffs and constantly be thinking about what are the most important and impactful things we can be working on.
[+] [-] driverdan|7 years ago|reply
[+] [-] mrkcsc|7 years ago|reply
I am hoping that in the future something like React Fiber (https://www.youtube.com/watch?v=aV1271hd9ew) will make its way to React Native and unlock a new level of performance.
[+] [-] mikewhy|7 years ago|reply
[+] [-] KirinDave|7 years ago|reply
This is why I really hate tools like react native. They try and create a code symmetry and that's not unreasonable, but then they go too far and create behavioral symmetry and that's pretty much unacceptable for as wide a gulf as browser apps and mobile apps. They have such radically different use cases.
[+] [-] victoriasun|7 years ago|reply
However, as Discord's mobile teams grow and expand we're exploring alternative UX designs that are significantly more mobile friendly. So your feedback is heard loud and clear at HQ :)
[+] [-] superplussed|7 years ago|reply
[+] [-] victoriasun|7 years ago|reply
- a Discord iOS engineer
[+] [-] rsingla|7 years ago|reply
[+] [-] HNNewer|7 years ago|reply