Live data from Hacker News

Discord Switching to React Native for Android App

discord.com

51–60 of 82 posts

Re: Discord Switching to React Native for Android App

#51
Here'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.

Re: Discord Switching to React Native for Android App

#52
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.

It 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.

Re: Discord Switching to React Native for Android App

#53

Earlier quoted context omitted.

My 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…

Did you consider using React Native Web?

Interesting, 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

Re: Discord Switching to React Native for Android App

#54

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…

just curious, but ever try kotlin-native to share non-ui code?

Re: Discord Switching to React Native for Android App

#56
post #18

Earlier quoted context omitted.

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.

Damn I wonder why they don’t use WinForms or Qt either? Could it be that it’s an entirely different use case than a regular desktop application?

Re: Discord Switching to React Native for Android App

#57

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…

So just like cordova / web shell apps, back in the day.

Re: Discord Switching to React Native for Android App

#58
post #13

I 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.

We 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.

Strange, I've never had that happen and I've used discord for years. A good portion of that time was spent using it on my 2015 MacBook Pro.

Re: Discord Switching to React Native for Android App

#59
post #56

Earlier quoted context omitted.

Electron doesn't really come at a significant performance cost? I wonder why Rockstar or Bethesda don't just use electron for their games.

Damn I wonder why they don’t use WinForms or Qt either? Could it be that it’s an entirely different use case than a regular desktop application?

Not a different use case, all draw shapes to users' screen. I've seen people ship games with electron. If what GP is saying is correct, AAA companies should have no problem deploying CPU/GPU-intensive games using Electron.

Leaving the sarcasm aside, I'm tired of people arguing Electron has no performance/memory/whatever cost. It's worse at everything compared to native programs except developer experience.

I understand valuing your developers' time more than your users' (which is a bit backwards but whatever), but don't argue that Electron is not a tower of abstractions that has no cost at runtime. That's just not true.

Post reply on HN