React Native is an impressive library for developing cross-platform mobile apps. Below are a few things that I wish I had known when I first started working with React Native.
Actively Develop on Both Platforms
This is a common mistake, and one that I made early on. I used to extensively develop features on iOS without testing them on Android during development. React Native is a multi-platform tool but there are lots of little things that behave differently on Android in comparison to iOS. It’s best to actively develop for both platforms early on in order to save yourself time and effort in the long-run.
Setup Automated Testing
One thing that I wished I did early on was to setup automated testing. As your app grows, the amount of time that it takes to manually test for regressions make it a daunting task. Get familiar with tools like Jest & Calabash. Figuring out your automated testing early on prevents bugs from sneaking past QA.
Test on Real Devices
If you’re planning to support multiple versions of iOS, or any version of Android, get real devices and use them for testing. Android has a myriad of variety when it comes to screen sizes, hardware, and manufacturer-variants of the Android OS. Continuous integration tools like Buddybuild make it easy to get your app out in the hands of real testers.
Don’t Be Afraid of Native Code
Monitor Native Logs
Upgrade React Native with Caution
Keep an eye on the RN community website. RN has a monthly release cycle. Since it is still a fairly new library, the APIs are changing quickly. Before updating to a new version in production, make sure that all of your dependent libraries are compatible with the RN version that you’re planning to upgrade to.
That’s it for now! If you have questions about React Native, or if you need help with your React Native project, feel free to get in touch.