React Native vs NativeScript: Advantages & Disadvantages? [Guide]

π‹πšπ­πžπ¬π­ π”π©ππšπ­πž – Do you want to know the difference between the React Native and the NativeScript? Both of them use javascript to write native mobile apps, but are you wondering what’s the specific advantages of each scripts? Here you can learn the advantage and disadvantage of one over the other.

Both of them use JavaScript to build the native app but they are a kind of different. React Native helps you to reuse your React knowledge while the NativeScript tries to be JavaScript<–>native bridge without emphasis on a particular technology or paradigm.

React Native or NativeScript - Pros and Cons

Tasked with building a cross platform mobile application for internal use I had the opportunity to evaluate both over the course of a month.

Advantages of React Native over NativeScript

Both serve the purpose of being a cross-platform JavaScript framework for mobile development. The power with React Native over other comparable frameworks is that it utilizes the abstractions and power of React. Facebook describes the advantages of it here as well: https://facebook.github.io/react/docs/why-react.html

React Native is used by top companies to create their mobile app such as the Airbnb, Baidu Mobile, Bloomberg, Facebook, Instagram, Skype, Tesla, UberEATS Vogue, Walmart and many others.

If NativeScript serves your needs and you like the paradigm, go with that. It’s a personal choice. I like React Native, and when combined with an implementation of Flux, I have found that it has really improved my app’s state handling, component reusability, and my overall development happiness.

Does using Flux + React Native introduce performance concerns?

React Native tries to achieve pretty close parity with native development performance. The issues I have observed have really just been with <Navigator> dropping some frames when rendering new scenes. All in all, it’s been really close to native performance. Check out their docs though for more on why you might see frame drops and such: facebook.github.io/react-native/docs/performance.html

I can sing many of React Native’s virtues. The developer experience is fantastic as is the community. I think flexbox layout model is an under-appreciated feature of React Native. It’s evolving and maturing very quickly. Still, I’m interested in NativeScript primarily for one major difference, it gives youΒ direct access to native platform APIsΒ which is pretty amazing and powerful when you think about it.

Advantages of NativeScript over React Native

Why should someone choose NativeScript instead of React Native?

  • Nativescript can share much more code than react native. Means it save your times.
  • The Nativescript is real Cross-platform which enable 100% native API accessing and Libs accessing.
  • As it use Angular 2, means it have all advantages Angular 2 have.
  • Unless you are already a React shop, the NativeScript syntax and implementation are much easier to understand for a developer who has been doing web development with Html/CSS/JavaScript. Using XML is very similar to Html for doing layout work.
  • The ability to leverage existing standards and tooling. For example, the syntax highlighting available in Sublime, Visual Studio, etc. already support XML/JavaScript. At the time of my evaluation, I could not find any add-ins to properly do syntax highlighting with ReactNative code. Instead, the developer might have to struggle with the text editor’s red underlining of all the “syntax errors” on valid ReactNative code.
  • ReactNative exposes a “touchableHight” area and you are required to draw a button inside. While it is easy to create a “button” module for reuse this is not as elegant as calling directly through to the underlying android/ios button (as NativeScript does). To many programmers, the whole point of using ReactNative or NativeScript is to call through to the native objects.
  • When adding a password field the ReactNative side didn’t change characters to bullets on the Android side even though when setting “secureTextEntry” to true. This worked first time on the NativeScript side for both Android/iOS.

Conclusion

I am still concerned about how this will turn out in the long run. Because Facebook is larger I assume more resources are being devoted to the ReactNative development than Telerik can do with NativeScript.

Leave a Comment