There are numerous frameworks available for building hybrid mobile applications where you can write once and the app can run on both Android and iOS. The biggest drawback of the hybrid frameworks is that they use web view for rendering and cannot access native components. This is where React Native and Nativescript offer a better solution where you can write once and run across platforms also accessing native components. We will be discussing in detail about various pros and cons of both the frameworks which will guide you in selecting the aptest one.
The primary objective of React Native is to “Learn once, write anywhere”. The core goal of React is to build platform oriented UI. While most of the code can be reused across platforms, React will allow you to build and render unique UI for each platform.
The primary objective of Nativescript is “Write once, use anywhere”. Nativescript follows a holistic approach and you just need to write once and it will be running smoothly across all 3 platforms. This is where Nativescript clearly wins the race against React native.
React Native provides the closest Native experience and also with native rendering offers super fast experience.
Nativescript again offers native rendering, since it uses Angular for rendering, it will be a relatively slower than React native.
Third Party Libraries
React Native created and supported by Facebook has matured a lot recently. Many of the third party applications have started providing API for React Native. More and more platforms are releasing new plugins for React native daily.
Nativescript also has a decent number of third party plugins but doesn’t match up to the count of React Native. Also, the plugins are not 100% verified.
React Native has a huge open source community compared to Nativescript. Be if GitHub or StackExchange React native easily outscores Nativescript. Here is a simple comparison
React Native: 50K+ stars and 12K+ Forks
NativeScript: 10K+ Starts and 850 Forks.
If you want to develop a truly cross platform app with a single code, then NativeScript is your first choice. If you want to create a more platform dedicated app with complex functionalities at high speeds, then React Native is the winner. You do need to re-write the UI for each platform with React Native. One more thing to consider is the size of the final application. Apps created using Nativescript has a higher size compared to React native. If you are developing apps to an audience who has a slower network connection, React is your answer.