DEV Community

Tibinko
Tibinko

Posted on • Updated on

Stop using React Native

Stop using React Native

I have been working on various React Native applications throughout the years. I was never a big fan of its architecture and I have never had a good experience with it. But the very last nail to the coffin is my current experience that I want to talk about.

In summer 2019 I was appointed as a technological leader for a medium-sized application with 2-3 thousand registered users. The application was handed over to us by a different company. It consisted of 2 backends, a web and a mobile application in React Native.

The initial time to run it took us something over the month without Android debug mode. It is true that the communication between 2 teams was not ideal (and there were a few peculiarities such as it was needed to put a certain binary into a particular place on disk...), nevertheless it took us an enormous amount of time. And we still did not have a development environment for Android. And it only worked in Xcode 10.1.

Then September came and an iOS 13 was released. That means we needed to prepare to use the updated version of Xcode and iOS SDK or we will not be able to release iOS apps anymore. Now the nightmare comes.

To update Xcode we needed to update React Native to version 0.60, I believe. The current state of the application at that time was, that about 1/4th of libraries used were still maintained. Unfortunately, there were 2 peculiarities right there.

The very first one was, that new RN added support for AndroidX. Unfortunately:

With this change, React Native apps will need to begin using AndroidX themselves. They cannot be used side-by-side in one app, so all of the app code and dependency code needs to be using one or the other.

So our 1/4th of maintained libraries were updated to use AndroidX. This itself meant that we needed to update everything or nothing. This was somewhat still OK since we were not forced to do that right away. Of course, it was not that easy.

Because, they also used CocoaPods to link iOS libraries by default. Perfect. All maintained libraries jumped right into that and of course you cannot have a few libraries linked manually, because React Native dependency would be linked 2-times.

And the result was that we needed to recreate the application (or that seemed like less painful way) and we needed to recreate most of the libraries used. It was created in January 2019, not even 1 year old.

I was like, screw this, let us go natively.

Our time limit was until March 2020, I believe, so quite tight deadline to recreate 2 applications that we did not fully understand.

Fortunately, we got lucky and due to COVID-19 the required iOS 13 SDK was postponed until 30th of June 2020. But since May we cannot release a new iOS applications with old SDK.

Today, after half a year of making a decision to migrate to native technologies, I must say that I am very happy I made that decision. There are 2 reasons for that.

The first one is that experience developing this application in past 10 moths were terrible. I came to work in the morning, turned on my computer, started Xcode and I saw errors I have never seen before (not even on a lot bigger native iOS applications) like "The project is corrupted". Then I got into never ending cycle of clearing cache, removing derived data, restarting computer. Sometimes it worked after an hour, sometimes half a day and my motivation for the day was 0.

Another issue is that things randomly stops working or starts to work. For example, one day building is working only through CLI, other day only through Xcode. Pure hell.

The second reason it seems they are (once again) planing a rework to their renderer. Finally changing their approach to have a JS runtime and removing their bridge. And you know what that means? That at the end of this year (2020) I would be once again planning how to recreate application from scratch. I am happy I dodged that bullet.

And the UI in native apps is incomparably more responsive and smooth than it ever was in React Native.

Top comments (1)

Collapse
 
polakja profile image
polakja

the same experience, the same result