Should We Use React Native?

By Dan Katcher

I frequently get asked by prospects and clients if they should use React Native for their next big project. React Native, originally started by Facebook, is a cross platform framework similar to the React javascript framework that promises to allow devs to write code once, in Javascript, that will work on both iOS and Android. The answer to that question, in pure consultant speak, is “it depends”. You can do lots with React Native. It’s easy to pick up and roll an app, and you can achieve pretty much anything that you could in a native app.

But if you are betting your company or your product on the foundation of React Native, I’d think again, especially if you’re looking for deeper hardware integration. This five-part series of posts by the engineering team at Airbnb brilliantly describes the reason they decided to chuck React Native after 2+ years of investment. The answer, quite simply, is that it added too much complexity and didn’t allow Airbnb to achieve their goals. Let’s see why.

The promise of React Native for most people is cost and time savings. Having a single code base for both iOS and Android in theory lets you write once for both platforms, which (again in theory) means fewer resources (one developer can cover both platforms) and faster time to market (getting two platforms out with the effort of one developer). The reality, however, is much different.

It’s useful to review Airbnb’s original motivations and goals in moving from native to React Native. They were already using the React framework for their web products and hoped to leverage that familiar framework onto their mobile products, which were exploding in popularity and required a rapidly increasing number of engineering resources. So their goals were the following:

  • Do more with less and move faster
  • Keep quality high
  • Write code once for multiple platforms
  • Keep developers happy!

So did they hit their goals? Let’s start with what worked well, which were a lot of things.

The good: speed & uniform code

Ultimately 95-100% of their code using React Native supported both iOS and Android, with only a small percentage being platform-specific. They also note that engineers came up to speed quickly using this framework, and that the build cycle was much faster — you can do a React Native build in 15 seconds as opposed to 15 minutes for native builds (especially on XCode) — which is a big advantage over time.

Additionally, React Native forced Airbnb to adopt a design language for their products that would be consistent between platforms. That discipline helped their developers. Also, because React Native is rooted in Javascript, that meant they could utilize the many open-source Javascript libraries available.

The Airbnb team was generally pleased with their ability to build just about anything with React Native, at good levels of productivity, and with code that hit a very high percent of being shared across platforms.

But the list of things that did not go so well is longer, and much more significant.

The bad: …read more

Read more here:: B2CMarketingInsider

Leave a Reply

Your email address will not be published. Required fields are marked *

CommentLuv badge