Still on the fence about choosing React Native as the framework for your next mobile app? We’ve got you covered.
We selected and answered the most common questions that pop up when people consider using React Native in a project. We hope this short guide will make things much clearer.
This can shorten the development time and reduce the overall cost of building the product. Another advantage is that you don’t need two separate teams for Android and iOS, but rather a single React Native team.
One of the most important things about React Native is that you can reuse the code that you built for different operating systems (iOS, Android).
It means working in one framework for multiple platforms. It’s a fast growing framework, too - over 2 years ago we predicted that soon it would be possible to use React Native without touching any native code, and now it’s more true than ever.
React Native is not a different version of React. React Native uses React.
Essentially, React Native is a custom renderer for React, just like ReactDOM is for Web. Apart from transforming React code to work on iOS and Android, React Native also gives access to the features that these platforms offer.
Most of the time when developing a React Native project, we write React code, which does not really differ from the code known from React for Web, but we should be aware of the unique properties of mobile platforms – some things might not be that obvious.
React developers are not React Native developers by default. That said, we can transform React developers into React Native developers in a short period of time by giving them an opportunity to gain experience in React Native.
Most of the React code for Web relies on features available in Web browsers, so it will not work on mobile and vice versa – React Native code relies on the features available on a given mobile platform. The good news is that we can still reuse some code between the mobile and web apps, and the ability to reuse the code will improve in the future.
The first thing worth mentioning is that PhoneGap was a very good solution a few years ago. Nowadays, with how technology has changed, it is no longer suitable for most users’ needs.
PhoneGap apps are hybrid websites embedded in mobile apps through a “WebView”. You could accomplish a similar thing using ReactJS, even in combination with PhoneGap, but in both cases access to native and device-specific functionalities is severely limited. The biggest benefit of React Native is much better performance than in the case of hybrid apps.
Above all, Flutter is something new on the market. It is highly promoted by Google, so it has very good support. We can also imagine that this modern solution will become more and more popular with time.
In general, Flutter, as a reactive framework, has excellent performance and is easy to learn, lets you build applications which look like native ones, and offers hot reloading.
iOS and Android offer different sets of features, and it's not React Native’s responsibility to make these environments equal. React Native is only a way of accessing the native components in iOS and Android.
I would say that most of the time – with some effort – we can make apps on both platforms look the same, but we shouldn't. We should stick to platform guidelines when it comes to user interface. Luckily, React Native provides us with an easy way to adapt the UI to the given platform’s needs.
See also: Pros and cons of React Native
React Native is great for most apps that rely heavily on the user interface, because with little effort, we can get the UI to work on both iOS and Android, and, most importantly, we can share the business logic.
Apart from that, React Native uses flexbox for layout, which works the same way on iOS, Android and Web, so we can transfer our experience from Web instead of learning more different engines.
On the other hand, a native app is great when we consider using all the features that a platform offers, including such modules as video/audio processing or multithreading. Since React Native focuses on the User Interface only, it can be less efficient for applications with many native features.
No, native developers are still needed.
They have massive experience when it comes to configuring mobile continues integration services such as Bitrise, services for internal app distribution such as HockeyApp, configuring certificates in XCode and so on. Apart from that,
This used to be a big issue when React Native was a new thing, but nowadays you should be able to find libraries for most native features you can think of. Writing custom native modules is rarely needed.
React Native apps still have some parts written in native code, and this is okay.
The future is bright and it belongs to React and React Native. ;)
This article was first published on Jun 2, 2017