2. Improved Development Timelines
Reproducing an iOS app on Android, or vice versa, requires a great deal of time and knowledge. Instead of duplicating your efforts when you know that you want to develop for both platforms, you can use React Native to perform the development simultaneously.
To cut your development timeline even shorter, you can use one of the many React Native templates or starter kits available online. These packages include boilerplate code that will save a great deal of time when kickstarting your next project.
Another major timesaver in React Native is Watchman, a file watching service that detects when you make changes to the codebase. React Native then re-compiles the code, pushes it to the developer's phone or simulator, and reloads the app. With traditional mobile development tools like Xcode, you need to recompile your code manually every time that you want to test something new, which can be quite time-consuming in the long run.
As an open-source framework, React Native is free of charge for all projects, whether personal or commercial. In addition, if you’re planning to release both Android and iOS apps, using React Native can cut your development costs nearly in half by saving your team from having to implement every feature for both platforms independently.
React Native is a fairly popular tool, so finding developers to work on it won’t be hard. If you want to outsource the development to a third party, you don’t have to pay the high salaries of developers with a more specialized skill set.
3 Reasons Not to Use React Native App Development
While React Native is a game changer for mobile app development, it certainly isn’t the right fit for every project. In this section, we’ll outline a few reasons why you might not want to use React Native for your next mobile app.
1. Code and UI Limitations
Despite being suitable for the vast majority of use cases, React Native is still not the same as directly programming in native Java or Swift code. Features that require advanced use of the hardware (e.g. bluetooth, accelerometers, gyroscopes, etc.) will require developers to manually intervene in the underlying native code. As a result, in certain cases React Native can actually add complexity rather than remove it.
In addition, the user-experience guidelines from Google and Apple around certain features may be significantly different between the two platforms. While React Native does support some convenient methods of switching out functionality in a platform-dependent way, the extent of design differences between the two platforms can make React Native a non-starter for some applications.
2. The Downside of Open-Source
Compared to other ways of building mobile apps, React Native is still a fairly new option. Work on the project moves fast, and developers are constantly releasing new versions of the framework that may not be compatible with other dependencies. Using React Native therefore requires you to have a savvy team that can keep up-to-date on the latest developments.
3. Alternatives to React Native
While it’s a good solution for many purposes, React Native isn’t the only option for cross-platform app development out there:
- Xamarin is a cross-platform tool integrated within Microsoft Visual Studio that can deliver native code for iOS, Android, and Windows mobile apps.
- Flutter is an open-source cross-platform development toolkit created by Google for building web, desktop, and mobile applications. Note that Flutter uses Dart, a programming language that’s not widely used outside of Google’s internal projects. To learn more about the differences between React Native and Flutter, check out this blog post.
How to Get Started with React Native App Development
If you’re interested in using React Native for your own cross-platform app development, here are a few best practices to keep in mind:
- Unit testing: Tools like Jest and Enzyme for React Native help you perform unit testing, which is essential to building a high-quality codebase. At Very, we practice test-driven development (TDD); we create the tests first, and then write the code that will get them to pass.
- Continuous integration/continuous deployment: CI/CD is a software development methodology that emphasizes automation and frequent, incremental changes to the codebase. Bitrise is a CI/CD tool for mobile app development on iOS and Android that makes it easy to implement this philosophy for your next cross-platform mobile app.
- Keeping components simple: Components in React Native should each be focused on a single responsibility, rather than spanning a number of disjointed jobs. If necessary, refactor your code and break things apart so that you have a modular, flexible codebase. Inject dependencies via props where appropriate to keep components nicely decoupled and testable.
To Use or Not to Use?
For many types of teams, the decision to use React Native is an easy one:
- Teams with web developers who want to transition to mobile development.
- Teams that want to develop iOS and Android apps simultaneously.
- Teams that already use React for their web application, which allows them to reuse much of the code for their mobile app in React Native.
If you’re wondering whether React Native is right for you, get in touch with a member of our team for a quick conversation. We can help you figure out the best solution based on your current business situation and requirements.