The good, the bad and the takeaways

React Native: A new competitor to native development?

Lolita Rogers
React Native

© Shutterstock / Dooder

React Native is only two years old but it has already proved its usefulness. However, is it as convenient as some say? In this article, Lolita Rogers weighs in on the advantages and reveals exactly what you should be aware of.

You may have already heard about React Native — despite the fact that it’s a pretty young technology, its potential is massive. Let’s sort things out for the ones who are not familiar with this development tool and are thrilled to learn more.

Actually, in the beginning, this whole “React” story was all about web development. Back in 2011, some guys from Facebook decided to combine JavaScript with XHP, which is the Facebook markup syntax. The result exceeded everyone’s expectations: ReactJS had JavaScript’s speed (that’s really fast) and a new approach to page rendering.

Four years later, in 2015, the same team from Facebook went even further and tried to adapt JavaScript to mobile development. That’s how React Native was created. So, what is it?

SEE ALSO: Facebook announces React Native

React Native — Is it as convenient as some say?

React Native is an open source framework based on the React.JS library which allows users to build applications on both Android and iOS platforms. It uses JavaScript and operates with the help of API written in Javascript over native components. However, is it as convenient as some say? Our experience says “yes”.

We have been using React Native since 2015 and have already written some apps with its help. During this time, we were able to gather enough intel so as to share it with you right now.

So, what advantages and disadvantages of React Native app development can we distinguish? Here they are!

What are the main reasons to use React Native?

  • Cross-platform development

Many mobile IT companies consider the ability to develop cross-platform apps as the main advantage of React Native. Actually, it was never so easy to build mobile applications for both main platforms (iOS and Android share about 96% of the market). With React Native, it’s possible to reuse up to 70% of the code and then just apply some platform adjustments (mostly concerning UI).

  • Rapid development iterations

Fast debugging is another thing that we like about React Native. When coding, you don’t have to spend a lot of time on the compilation or uploading the app to a physical device or an emulator each time. Instead, all your updates can be monitored right away. It significantly boosts productivity and reduces development time.

  • Simplified layout

Native iOS or Android developers often face problems when working on UI. However, React Native has another development environment where the whole process is much simpler! Actually, they decided to make mobile UI development similar to web development. Therefore, when building an app with React Native framework, developers operate with blocks that can be easily managed.

So, for example, you can just forget about sophisticated rule system that’s typical for iOS. It makes the whole process fast and not too complicated, especially for ones who have some web experience.

Tip: For this purpose, RN developers apply Flexbox algorithms.

SEE ALSO: Preact: The fast 3kB open source alternative to React

  • It is constantly improving

The React Native framework was created only in 2015, so it’s relatively young. Therefore, it’s constantly improved and updated with new features. Moreover, as its library only grows with each coming year, it becomes more and more beneficial and easy to use React Native in your mobile development.

  • Component composition

One more advantage of Facebook’s framework is a convenient system of component reuse. React Native allows you to store the most used elements of your app so they can be placed on different screens without any changes.

Moreover, such an approach is more convenient than code copying. Why? Because if you’ll ever make some changes to the component, these changes will automatically apply to all its copies.

  • After all, you get almost a native app

Many cross-platform frameworks (like PhoneGap or Cordova) render code via a mobile engine called WebView. Yet, if you have ever used/developed such apps, you should know that their performance is usually very poor.

React Native, on the other hand, renders code to native APIs without the help of any mobile engines. Moreover, this framework offers a set of native modules that are written in Objective-C and Java out-of-the-box. They help to improve performance in computationally heavy operations (for example, video playback). Finally, you get a mobile app that’s written in JS but looks and feels like a native one.

However, everything can’t be so perfect, can it? Of course, React Native also has some weak points and we’re not going to hide them from you!

React Native: What should you be aware of?

  • Imperfect navigation

One of the things that React Native can barely handle is in-app navigation. This is particularly conspicuous when we talk about navigation between displays. Yet, you should also remember than native development doesn’t offer any perfect solutions for this matter.

  • Documentation issues

As you know, React Native is a pretty young framework that’s being actively developed. On the one hand, you may still face the lack of documentation now as it doesn’t offer you precomposed solutions in some cases. On the other hand, due to regular library updates, you have to monitor all the new changes so as not to miss something important.

  • Lack of language strictness

JavaScript (which is the backbone of React) is a flexible programming language but it doesn’t offer developers any strict typing or enforcement of inheritance. As a result, developers can get disordered and unclear data flow. However, this can be easily fixed with help of tools like Typescript or Flow.

Takeaways

React Native is the relatively new framework created by Facebook that has already proved its usefulness. This development environment is getting more and more popular since it’s based on flexible and fast-working JavaScript and has a pretty clear structure. One of React Native’s main advantages is the possibility to reuse code and build mobile apps for both Android and iOS platforms at the same time.

If you have never used React Native, we hope this article has sorted things out and will encourage you to try it. Good luck!

Author
Lolita Rogers
Lolita Rogers is a web developer and UI/UX designer. Producing at the crossroads of minimalism and sustainability to answer design problems with honest solutions.

Comments
comments powered by Disqus