Software engineering today is all about building better, value-driven digital products more efficiently. This 'mantra of efficiency' is especially present in the organizations leaning toward mobile app development.
And this is no surprise. Up until recently, you'd have to have two completely separate engineering teams if you wanted to build apps for both iOS and Android. This translated into more cost and more complexity.
The common question among organizations would then be: Should we build native apps to deliver the best possible user experience or turn to a faster and more efficient way of building apps that can run on more platforms and devices?
The truth is, there's always a tradeoff of some sorts. And that's OK. Especially now when we can build fully functional cross-platform apps with a powerful framework like React Native. And the best thing is that React Native actually compiles to native code and makes the apps run as smoothly as the apps written in Swift, Java, or Objective C.
As early adopters of React Native, we've been using it for years and it really accelerated the process of building mobile apps for different platforms while maintaining the high-quality requirements that we impose internally.
Now, let's look at why you should consider building React Native mobile apps.
For our team, quality is the number one priority. We dedicate a lot of time to understanding user needs so we can address them in the best possible way. The design has to be slick. Apps that we create have zero learning curve. They're so easy to use that they feel natural.
Quality and speed correlate and, in the world of continuous market changes and changing customer needs, speed of addressing change becomes a crucial thing that makes or breaks the product.
Having a single code base makes a huge difference. When we first started using React Native, just the fact that we could efficiently reuse most of the code between different platforms was transformative.
React Native provides a number of built-in ready to use components that can speed up the development process. In addition to shortening the development time, it also helps improve the consistency of the app's business logic between all supported platforms.
For example, we chose React Native to build an access control management application for a client. It enabled us to build a cross-platform application and quickly adapt to the changes and new HW models and requirements. All this was done from a single codebase and the system was maintained on multiple platforms at the same time.
We were able to share around 95% of our code for both the Android and iOS version of the app. This saved us an incredible amount of time!
Another great value of building this app in React Native is that we could reuse the same styles thanks to 'styled-components,' a CSS-in-JS library. This means we didn't have to reinvent the wheel when it came to making our design consistent with the other products that the client already had.
You've probably heard this a thousand times - cross-platform apps are inferior because nothing can run as fast as native code.
React Native is different as it translates the code to native and you won't see the difference in performance. When you do hit a performance issue, it is usually because of your code and the approach you took.
Here's one potential performance bottleneck - there's a lack of quality animation frameworks and when you need complex animations it usually means taking care of it on your own.
One way to go about it is using a declarative API such as Animated to make the process of implementing interactive animations easier. You can use it to optimize the required serialization/deserialization time. What happens then is that driver executes the animations frame by frame.
React Native is at the height of popularity right now and this is evident both by the number of big brands using it and the continued growth of the RN community.
To the SpiceFactory engineering team, React Native enabled faster cross-platform mobile development while maintaining high-quality standards.
However, this doesn't mean that we've abandoned native frameworks completely. We still need them, especially for low-level APIs, efficient access to sensors, or for using GL. React Native makes it easy enough to use native code where needed and use RN for the UI.
So, should you use React Native for mobile development?
There's never one answer to everything. This decision really depends on different factors that have a lot to do with specific project requirements and the available resources in your company.