Hey, it’s Tom. I’ve spent a couple of last weeks playing with React Native and today I want to share with you my thoughts about this framework from the perspective of an iOS and Web developer. Before I will start I just want to clarify that I’m talking about cases in which we distribute the app for iOS and Android. React Native supports other platforms, but writing one app for those 2 platforms is probably the most popular case. Ok, let’s start 😉
In the beginning, I would like to focus on the advantages of React Native. Let’s start with a business point of view, as this is where React Native shines the most in my opinion. Then I will switch to the developer perspective.
- saving time – this is probably the most important and the most popular advantage of React Native, you write one code and it works on 2. So having for example 2 developers working on one code base means, you are able to build an app in 3-4 weeks instead of 6 weeks, assuming that 1 dev would work on iOS and the second one would focus only on Android, sounds like a great deal 😉
- saving money – talking about savings, we cannot forget about money. As I mentioned a moment ago, in theory, by using React Native you are able to deliver the product for 2 platforms way faster than while writing it natively. I don’t have big commercial experience in React Native, but I asked my friends and we can assume that you can save around 30 to 40% of development time. We also cannot forget about the possibility to share codebase with the web app. If the frontend is written in React.js and logic works in a similar way, then there is definitely some part of code that can be reused across React.js and React Native, which can also lower the cost of delivery. We cannot forget about maintenance, we fix bug once and write new feature once (at least in theory), which significantly lowers cost of maintenance for multiple platforms.
- better utilization of developers – staying with business point of view, if a company already have frontend developers knowing react.js, and they are out of tasks, then they can jump into React Native project as support developers because, under the hood, both frameworks are very similar. It’s really easy to start working on React Native project if you are already familiar with React.js.
- ability to distribute app using official store – this is a big advantage, which is commonly missed. At the end of the day React Native App is wrapped in a native bundle, thanks to this you can distribute it using Google Play or AppStore, it’s not only the most reliable and easiest way of finding apps, but for an app owner it’s probably the best way to reach big audience of potential customers.
Ok, as you see any manager or CFO will be impressed by React Native, but what about us, developers? Let’s take a look at React Native from a developer perspective now
- It’s super easy, and free, to learn from scratch. Detailed documentation, lot’s of tutorials explaining every aspect of app programming, many blogs dedicated to React Native, you just need to want to learn it. Moreover, if you are already a React.js developer, then you luckily know most of the concepts used in React Native and within few days you can easily become a React Native developer.
- Ability to coexist with a native app – for some of you it might be obvious, but this is pretty important and we shouldn’t forget that not the whole app has to be written in React Native. Native and React Native code can coexist and that allows us to not only write more sophisticated screens using Native Code, but it also allows us to write one screen in React Native and use it in 2 separated native apps. That might be the first step in a transition into a common React Native codebase.
- Hot Reload – if you are developing a more sophisticated app and you have a meeting with designers who want to “move it a little bit right, well actually no, maybe move it a little bit left” then you will love hot reload, as it will save you lot of time. This is just one situation, but it really improves the development process on a daily basis. If you are an Android or iOS Developer you will be surprised how much time does it save.
Ok, as in the case of any other technology, not everything is so great, and while choosing React Native, we should not forget about its problems it may bring.
- performance – if you are going to build a simple app fetching content from the API and just presenting it to the user then you will not notice any problem, it will work as well as a native solution. In general, performance is not a problem unless you start adding many animations or data processing to the app. Mobile phones are so powerful right now that they are able to handle JS scripts doing magic very efficiently. If you want to see a great benchmark, I highly recommend a post on medium in which you are able to see a direct comparison of Native Solution, Flutter, and React Native, it will help you to better understand what kind of animations and how many of them might be a problem, link to this post will be in the video description. https://medium.com/swlh/flutter-vs-react-native-vs-native-deep-performance-comparison-990b90c11433
- debugging is hard – React Native is a mix of native and non-native technologies, as a result, different problems may appear on different levels of this stack and on different platforms, which is not very uncommon. Luckily React Native team added last year Flipper (https://reactnative.dev/blog/2020/03/26/version-0.62) and LogBox (https://reactnative.dev/blog/2020/07/06/version-0.63), both those tools made debugging way easier than 2 years ago, but still, from the perspective of iOS developer, it’s not as easy as it could be, a good example are breakpoints, which are not working out of the box…
- Accessing more sophisticated, platform-specific features still demands writing native code and calling it from React Native, keep that in mind, because if your app does need to work with Bluetooth, Wi-Fi, custom camera access or any other sophisticated technology it may turn out that you will write a lot of native code and just a UI wrapper in React Native and as a result, you will sacrifice native feeling and not save as much time as you expect.
Ok, so you already know what are my key observations about React Native, so it’s definitely time to sum it up. I really like React Native and I strongly believe that this is a great tool, but not for every case. If you need to deliver a not very sophisticated app, more like a content consumer, then go for React Native, you will save time and money and the end-user will most likely not notice any difference. It might be also a great choice if you want to rapidly prototype MVP, especially if you know React.js. But… if you want to deliver some more sophisticated and highly polished app… there is simply nothing that can beat native solutions, especially iOS SDK 😉
Ok, I hope this post helped you, if you agree or disagree with my insights feel free to let me know in the comment section below. You can watch the video version of this blogpost on my Youtube Channel: https://youtu.be/u7YDLvOl-ec