React Native: what is it and when should you use it?
March 04, 2022
The guide to React Native in 2022
We sat down with Rob Morgan to discuss how React Native works as well as its pros and cons in different scenarios. Here’s what he had to say.
What is React Native
There have been numerous solutions that have helped web developers create mobile apps without the need to write native code. React Native is another one of those solutions.
It was developed by Facebook as a reaction to the struggles that it had with its own approach to mobile. Before React Native was open-sourced in 2015, Zuckerberg acknowledged that the “…biggest mistake we made as a company is betting too much on HTML5 as opposed to native.”
Since it was open-sourced, the React Native community has grown strong, with literally hundreds of official community-driven, open-source libraries to help developers create mobile apps faster and make them more reliable.
It’s not only the development community that has adopted React Native; many other extremely popular apps, such as Skype, Instagram, Pinterest, Discord, Words With Friends, Walmart, and Uber Eats, have also adopted it. It doesn’t suit all situations, however, Airbnb has written at length about issues it’s had with React Native.
What skills are required to develop a React Native app
What are the advantages of React Native?
It’s also built on the most popular language (for the 8th year running), which helps greatly when it comes to flattening the learning curve. This also helps for casting and managing team workloads, as developers can move between your web and mobile teams and are able to get up to speed relatively quickly.
It can also be integrated into an existing native app, reducing development time for new features. Not only that, but your React Native codebase can also be used with your web app, meaning there is a possibility of three channels from the one codebase.
Maturity: React Native has been around for a while now, and since being open-sourced in 2015, the large number of community libraries and starter templates helps to reduce development time even further.
What are the disadvantages of React Native?
Based on the advantages, it sounds like choosing to build your app with React Native is a no-brainer. However, there are also some limitations to React Native, so it’s important to take these into consideration before making your decision. The main things to watch out for are:
Animations: If your app requires a decent amount of smooth animation, then React Native may not be the best choice. By ‘a decent amount’, I’m not referring to something like Angry Birds, but subtle things like Spotify’s transition of the tab-bar/compact player to the large player. Your designers may not always be able to get the animation that they desire, so it’s important to explore whether or not the designed animation affects the performance too much.
Lists: If you have large lists, especially those that include images or video (think Instagram), then scroll performance may quickly become an issue that you’ll need to tackle. A good example of this is Discord. Whilst it still chooses React Native, the team needed to invest a large amount of time and effort into improving performance (even having to develop native modules to achieve this).
E2E testing: There’s no built-in default End-to-End (E2E) testing library for React Native. There are solutions such as Detox, but these aren’t as performant or reliable as the in-built E2E solutions that come as standard with Xcode and Android Studio.
Why is E2E testing important? It allows automation of critical user flows, helping to stop any bugs from making their way into your production app.
If you’re not careful, bottlenecks can occur, resulting in laggy user interactions, especially on older Android devices. In saying that, there is an open proposal within the React Native community that looks to improve this, so it’s something to keep an eye on.
User experience: Because of its cross-platform nature, it can be very easy to make unintentional compromises in user experience and flows when building apps with React Native. Whilst writing once for both platforms is a major benefit, there are subtle differences between platforms that ideally should be respected; for example, navigation, search experience, date pickers, and typography.
In which scenarios would you recommend using React Native?
Some good candidates for a React Native app are:
Messaging apps: Discord, a major player in this field, uses React Native, which says enough. Whether it’s creating your own messaging app, or integrating live support into your existing app, React Native could be a good choice.
Service apps: Apps that mainly display data with limited user input would be a good choice for React Native. This could range from health insurance to fitness trackers, or even your local coffee shop.
News apps: Typically, these apps are limited in terms of animation so are ideal candidates for React Native. They’re very data-driven, but can also include audio and video. News apps can vary greatly (eg Apple News vs FlipBook), so whether or not React Native is best suited for your app will depend heavily on the design and user experience required within these kinds of apps.
Utility and productivity apps: Whether or not React Native is best suited for utility and productivity apps rely heavily on the design and user experience required. However, some good use cases could be fitness trackers, timers, converters, weather apps, calculators, and to-do lists.
Fin-tech apps: Typically these won’t have much in terms of animation and will also be quite data-driven. If you have a look at some of the financial apps on your phone, there’s generally nothing special about them, so they could be a good candidate for a React Native build.
Experimental features: Let’s not forget that React Native can be integrated into an existing native app. This extra benefit means you can quickly and relatively easily build and test new features and/or workflows inside your existing native app.
In which scenarios would you advise against using React Native?
As touched on previously, React Native may not be the best solution for anything that involves a decent amount of animation or visual editing; both image/video editors and games that require animation certainly fit within this category.
I’d also suggest that a native solution is a better choice for any app that requires heavy user interaction and a high level of performance; good examples of these are Google Sheets or Notion.
Even though the Skype and Discord apps have either been built with or include React Native, I’d recommend that an app that’s more involved, such as Spotify, should be built natively. The main reason for this is user interaction and expected behavior with native controls, the image-heavy lists, and the current state of community libraries.
If your app needs integration with Apple Watch, or even to display widgets, then you’ll need to write native code. React Native doesn’t cover these scenarios, but these can be added to your React Native app. That does mean, however, that you’ll most likely have very similar code (or even duplicate code) in both the native and React Native environments, which isn’t ideal.
Kin and Carta plc published this content on 04 March 2022 and is responsible for the information contained therein. Distributed by Public, unedited and unaltered, on 04 March 2022 16:55:02 UTC.
Technical analysis trends KIN AND CARTA PLC
|Short Term||Mid-Term||Long Term|
Income Statement Evolution
|Number of Analysts||3|
|Last Close Price||
|average target price||
|Spread / Average Target||55,5%|