Oh yes, it happened! They didn’t care about the time and efforts it would require, they didn’t care if they had to change their entire codebase. So, let’s see what could possibly be so upsettingly wrong with React Native that forced this giant Online American Vacation Rental Business to part ways.
Just to give you a heads up, here is how it’s going to go down:
First, we’re going to see why React Native was initially chosen by a big company, such as Airbnb, in the first place.
Next, we’ll figure out, why this decision turned out to be so expensive for them later, even though, it seemed so justifiable at the time.
Then, we will analyze how the solutions provided by React Native slowly and steadily started becoming potential problems for them.
Conclusively, after having understood all of the above-mentioned points, we’ll try to learn from Airbnb’s mistakes. Well, actually we’ll try to avoid them by learning how to identify an appropriate framework that fits well with your project’s needs.
There’s so many different frameworks available in the market today. React Native is just one option, we have Ionic(for Angular), Flutter and many more. Therefore, in addition to understanding the solutions these framework provide, we also need to understand the problems they impose. Moreover, another great question to ponder upon is, if you should even go with one of the frameworks mentioned above, or should you be developing actual native apps using numerous programming languages, such as Objective C/C#, or Java/Kotlin(for Android)?
Let’s back up a bit: Why React Native?
Till the year 2012, Airbnb was just a React website. They didn’t have any mobile application whatsoever. However, sooner more than later, they realized that having a mobile application is the need of the hour. Even if, people seem super comfortable with booking their vacation rentals on Airbnb’s website using their laptops/desktop at home, once they travel to their destination, a mobile app might come in handy to access their booking information or to even make changes to an existing booking or to book a new stay. As the majority of people don’t carry their laptops on vacation, so, all they have access to are their smartphones. Now, one resort for them would be to use Airbnb’s web application on the web browsers of their phones, which doesn’t make much sense. Therefore, the team at Airbnb realized that they really need a mobile application.
Next, they spent the first 4 years developing native code, yes, believe me, they actually developed native Android and IOS applications, but not many people know about that. In fact, rumors had it, that all of Airbnb’s code was written in React Native, but that’s not true at all. On the contrary, Airbnb was very successful with native mobile applications. When they started using React Native in 2016, however to date, only 20% of the code is written with React Native. Fyi, Airbnb has 800,000 lines of code. So, clearly, not all of that is written with React Native. Though Airbnb wasn’t immature enough to adopt a new framework entirely, for their well-established code base, it still became a problem in the end.
Now, have you ever used or heard of Airbnb’s “Experiences”? That was the big reason behind the introduction of React Native to Airbnb’s application in 2016. The rationale behind launching “Experiences” at Airbnb was that this will not only allow users to book BnB’s but will also allow them to book one-of-a-kind experiences in the form of, events, or some other exciting classes that people might be interested in(perhaps when they visit a different city). This feature even triggered a conversation amongst the members of the software development team at Airbnb about if they should continue developing very difficult yet very efficient native applications, or should they shift their focus on something like React Native which could be implemented easily and will spread their components into different applications. Now, due to a small number of people responsible for developing the native mobile applications, testing them, and making rapid changes to keep them up to date with the actual website(which was being developed very quickly), maintaining these native mobile apps became a problem for them as they did not have the budget(enough developers) for that. Moreover, they did not have the resources to hire hundreds of developers, specifically for Android and IOS.
Now, Airbnb was presented with 2 options, i) they bring in more investments, aggrandize the company, and use these funds to add more people to their native mobile application development teams, ii) they already had hundreds of developers well-versed with React. So, why not use these developers to create reusable components which could be used in React Native, which would, in the end, deliver a near-native experience in mobile applications. Obviously, they went with the latter option. This decision, even at that time, created a stir, as it had a lot of proponents as well as opponents.
Why React Native became a Problem?
Now initially, it went well for them, however, as the company started to grow bigger they wanted to use native features of mobile applications, to be specific, they wanted to use the native maps very precisely and very efficiently, as for companies like Airbnb, detecting locations precisely is very crucial, for them, literally, everything depends on maps! They wanted things like geolocation, internationalization, and many other complex features, that are not often needed by other types of applications. This was the reason why React Native didn’t bode well for them anymore.
There are 2 big reasons why companies like Airbnb go for frameworks such as React Native, i) they don’t have a lot of dedicated developers to work on Android and IOS applications, however, they do have many full-stack/web developers, therefore it’s convenient for them to reuse their skill set to provide a native mobile application to their customers without having to add an extra cost on their business. Easy, right? At least, that’s what they think! ii) when companies do know that they won’t need many native functionalities, and even if they need some native functionalities, they won’t be very extensive and just a few bridges would make it work.
How the Solution became the Problem?
Now, the above-mentioned reasons might seem justifiable in the initial phase of a company, but, as soon as you need more complex native features, it becomes stressful for the developers to maintain mobile apps as these frameworks don’t really provide all the features/conveniences provided by the native programming languages(it isn’t a full switch). As we saw before, some features need developers to write native code in C, Objective C, or Java/Kotlin. Now, when most of the firms hit this wall of limitations, they expect their web developers to start coding in native(completely different) programming languages which is clearly a big problem as most of them don’t know the first thing about these languages, there is a huge learning curve associated with it. However, even if the developers start doing that mid-way through their projects, the logic behind choosing popular frameworks has collapsed. As, now these frameworks rather have resulted in duplication of code, more work, more efforts, and more time; exactly the contrary to why they were chosen.
Airbnb faced the same challenges. They had to turn to developers from other teams(who were well-versed with native programming languages), whenever they faced obstacles while adding more complex features to their React Native apps. As you can see, how this would lead to a huge wastage of their time. A developer working on a different project in a different team takes some time to adjust themself to what the React Native team was working on. Let’s take an instance, let’s say, Team A approaches a very experienced Android developer from Team B for help on a problem they are facing with a project. Team B’s manager allows this experienced developer to work with Team A for 10 days. Great! What happens next? Now, this Android developer spends the first 3–4 days understanding the problem, which could be anywhere; even in the part of the code of the web application itself, and not specifically in the Android native code. If this happens to be the case, unfortunately, a senior developer ended up wasting a whole week for no good reason; and if not, then the developer who helps the other team doesn’t really get anything out of it, there are no incentives for them. This makes the environment of the company very political because now developers are expected to help other teams anytime(problems can occur even a day before the release).
As if all those problems weren’t big enough, yet, the list doesn’t end here. Another issue with React Native is that it’s a never-ending investment. It’s just 2 years old and developing rapidly on an ongoing basis. It still has a lot of internal problems and Facebook is working really hard to make it better every day.
Should you use React Native?
If you’ve reached this section of the article, and if you’ve thoroughly read everything that was mentioned above, I am sure you might be thinking, “Is React Native that bad?”, and the answer is NO, it’s not bad at all! The reason behind all the problems is that Airbnb had to use some native features that not all companies and not all applications need to use. So if you are thinking, if you could work with an alternative to React Native that might help you solve all these problems, I hate to break it to you, but there’s no alternative! It’s an either-or kind of a situation, where you have to choose between writing native code using native mobile-app development programming languages or a framework such as React Native, Flutter, etc.
Now, let’s address the most important question here, “After having learned what happened with Airbnb, should you or should you not choose React Native?” And the answer is, it depends on your application. It depends on what kind of features and functionality your application should offer.
If you just have a simple website that shows some analytics, perhaps some data that users can interact with. Your best bet would be to use something like React Native. If you don’t like that use Ionic or Flutter or something else, but don’t write native code. Writing native code will be very expensive, here. On the other hand, if you need to use native features like access to the device’s WI-FI, talk to Alexa, use geolocation, etc. In short, if you need to have native control on some crucial features supported by a mobile device, don’t even think about using React Native or any other frameworks. I am sure, by now, you know why! As simple as that!
So, that’s it for this article, thanks for reading. I hope it was worth your time. Leave your thoughts down in the comments section. Happy learning!