Write once, run on iOS and Android. It’s a goal many developers have set out to accomplish. Early solutions tried to bring web resources to mobile, but never had the experience users expected. Later solutions ditched the web development but were based on proprietary technology. This often led to a lack of a strong community, and much like before, these solutions lost momentum.
So when our mobile team here at Sprout started work on the mobile app for our employee advocacy product Bambu, we chose to build it in React Native. Prior to this project, our only mobile app was Sprout Social iOS and Sprout Social Android, which are built independently of each other using native technologies. By building Bambu Mobile in React Native, our team was not only able to have a shared code base, but was also given a fresh perspective on how mobile apps can be developed.
Choosing React Native
As far as long term viability, Facebook appears very committed to supporting React Native. The technology is used in many of Facebook’s own apps including Instagram and the main Facebook app. The open source community supporting React Native is also strong. Often times, when we found a bug or needed a capability, it was waiting to be released in a new version. This offered a nice contrast to iOS or Android, where it may take a whole year to wait for bug fixes or code improvements.
After learning from this community when building the Bambu mobile app, we hope to bring some of the ideas and patterns we learned back to our our native Sprout Social mobile apps. On Android, our team has started to explore RXJava, which follows the same event-driven pattern React Native is known for. On iOS, we have started to use stack views, which is similar to the grid like system of Flexbox in React Native.
The Benefits of a Team Effort
In the end, each one of these technologies have small details that need to be worked out. If a React Native team is made up of developers from only one of the disciplines, they may find that these small details end up costing a great deal of time.
While React Native is still a developing technology, we are confident in our decision to use it for the Bambu mobile app. After all, we were able to write 90% of our code in a shareable language backed by a strong and contributive community. This not only allows us to reduce maintenance going forward, it also opens up the number of engineers that can support and improve the app. In the future, we also hope to integrate React Native into our main Sprout Social app and maximize our ability to share code across teams.