First, you need to understand what React is. React is a tool for creating user interfaces. Its main task is to ensure that what can be seen on web pages is displayed on the screen. React makes it easy to create interfaces by dividing each page into small fragments and components. It is very convenient for creating web applications and does not require a large entry threshold. So, the guys from Facebook thought it would be cool if React could be used to create cross-platform mobile applications, and in 2015, React Native was introduced to the public and appeared on GitHub, where everyone could already contribute. React is popular for several reasons. It is compact and has high performance, especially when working with rapidly changing data. Due to its component structure, React encourages you to write modular and reusable code.
There are powerful tools that we as a Mobile Reality are using on a daily basis.
Feel free too use them:
Why did RN become so popular?
it is possible to quickly write an application for both platforms. Lower costs — more profitable for business;
large library of native and non-native components;
for debugging, you can use the browser, and it is also hot-reload for quick viewing of changes. There is no need to rebuild the application when making changes to the code;
for rendering components, native components of the system used are used (for example, UIImage/ImageView), respectively, the performance of such a UI is higher than when using webview;
just write your own library for RN, using the native functionality of the system;
another reason why the RN has gained popularity in recent years is that it is used by such giants as Facebook, Instagram, Skype, Tesla, Baidu, Bloomberg, etc.
In React Native, everything is native, so forget about full cross-platform compatibility. The platforms are different, so the components are different. They have different logic and mechanics of interaction. You can write everything in JS and throw out the concept of native, but you don’t want that. Native is your advantage!
On the example of the Vine app in iOS. What is customary to do in iOS? At the bottom of the tab bar, it is customary to switch screens: the home, profile, search. On top of the NavigationBar, and it is customary to write the name and buttons on the left-right (usually back is on the left, and on the right — some action). And in Android, everything is not so. There is also a NavigationBar, but it is different, it is not accepted to do buttons. To do this, there is a separate component called the toolbar. In Android, it is customary to make segmented activity-it is on top, very similar to the iOS tab bar, but the mechanics of its operation are completely different. If in tab bar we can not swipe to switch screens, then in Android it can be done, and it is customary to do, and that’s how it works.