Hacker News new | ask | show | jobs
by vorpalhex 1930 days ago
I was with a team that went the React Native route. At first it was fine until we had to go slightly off the rails.. and I was rebuilding .so files based off random gists and updating linkage assemblies.

React Native works until it doesn't and then you are getting into very detailed platform specific territory.

A lot of the cross platform promises were untrue - we quickly learned the importance of QAing both builds and frequently had platform specific patches.

Just bite the bullet and go native upfront.

2 comments

I have had the exact same experience. I’m not a big fan of React or React Native, but I can see that it does increase code reuse; but...

As you say, platform-specific glitches will always crop up so you’ll always need a bit of native work. If you’ve thinned out native development team this can make things hard. Instead of a team of 5 or 10 native developers working on bread-and-butter UI stuff, you only have enough work for 1 or 2, but it’s all grungy stuff like talking to low-level frameworks and working around platform bugs (or React Native bugs, of which there are plenty). That’s not a recipe for clean and maintainable code.

A related issue is that React and React Native aren’t 100% compatible. You can’t just move existing React code directly over as you might elect. It is possible to write code that works on both, but it isn’t trivial.

QA definitely needs to be done separately on each platform.

Or give Ionic react a try
I would not recommend Ionic. I've been using it in a medium sized app for about 3 years now and I get the feeling it's good for getting started, but once your app grows past a certain size it's starting to create more issues than it solves.

Some examples from the top of my head:

- various performance issues (e.g.: memory leaks which haven't been fixed for years [1])

- their push/pop router navigation seems like a really bad idea

- worse developer experience than using Angular directly (e.g.: last time I checked this, the save/compile/reload cycle of an Ionic project was an order of magnitude slower than the same project without Ionic)

[1] - https://github.com/ionic-team/ionic-framework/issues/19242

This heavily depends on the framework you choose to use, and modern Ionic uses the stock tooling your framework does, so build times should be on par with any other project of that framework type. Earlier versions of Ionic had custom tooling and much slower build times.
This was happening in an Ionic 4 project which was already using the stock tooling of the framework (Angular CLI). But I remember it being worse in Ionic 3 with its custom tooling, so overall things do seem to be improving with time.

My findings at that time (it was a while ago) seem to match exactly the slowdowns described in this issue [1]. Just importing the IonicModule in a new Angular project (without actually using any Ionic component) made the dev server build times jump from around 200 ms to a couple of seconds. And the situation only seemed to get worse as more Ionic features were being added to the app.

Just to make it clear, I understand that this is an open-source project and I don't expect anyone to fix my issues. And I'm also very grateful to you and the Ionic team for giving us Capacitor which is such a big improvement from Cordova.

So I don't like being all negative in here. But I did encounter a fair share of issues with Ionic and I'm only sharing my experience here as just another data-point in case it helps someone make a well-informed decision.

And I have to say, the overwhelmingly positive reaction to Ionic in general did make me question my own abilities several times. Maybe I just don't "get it". I still haven't ruled that out as a possibility.

[1] - https://github.com/ionic-team/ionic-framework/issues/17902

Thanks for the info. I do think the choice of Angular here is significant. Angular builds have historically been very heavy. Later versions have sped things up and Ionic apps have gained from that. I haven’t seen slow builds in React, for example.
-the push/pop router navigation is insane, it by default keeps all views in memory all the time for react it will reload every view with any state change by default.
Interesting but is this still the case on recent Ionic releases?