Although React Native has been around since 2015, the mobile developer debate is still on: is it worth it to commit to this JavaScript mobile framework, or should you follow the traditional route of native development using other technologies like Kotlin or Swift? Of course, the answer to this question will always depend on a lot of factors that are specific to each project, but luckily there’s one thing you can always do to start making your way towards a definitive answer—taking a look at what leading tech companies are doing.
So we are going to take a look at Coinbase, one of the most popular cryptocurrency exchanges in the world, and its relationship with React Native. In early 2020, Coinbase joined the club of large companies who partially or completely rewrote their mobile apps with React Native, along with Uber, Erikson, Facebook, Instagram, Pinterest, Discord, SoundCloud, Skype, and many others. But why use React Native? What makes React Native so great for modern mobile development? What other apps have been built with React Native? And, most importantly, why did Coinbase decide to rebuild its mobile app using this framework? Let’s take a closer look.
React Native Components Are Great for Reusability
Every developer can appreciate clean, well-documented, and DRY (Don’t Repeat Yourself) code. However, writing code like this for mobile apps hasn’t always been easy, especially in the case of native builds. Smaller apps don’t really have to worry about this at first, but once the project starts to scale, things can get pretty messy pretty quickly. And that’s where React Native components come in.
For starters, React Native components are nothing more than composable JavaScript functions that take immutable inputs (a.k.a. “props”) and return elements that control what’s on-screen. If you’ve ever worked with React code before, then you probably know that these are the fundamental building blocks of any React app, be it native or not.
According to several articles on their blog, the software engineers at Coinbase use components to split the app’s User Interfaces into self-contained pieces that can be reused at will. This is all managed through a custom-built family of components that contains all of the elements that are needed on a regular basis, including forms, buttons, headings, paragraphs, screens, spacers, and tons more. The Coinbase family of components even includes more complex elements like UI widgets and themes, making visual consistency easier and faster than ever. And, yes, they were all written in TypeScript.
Development Speed Skyrockets with Fast Refresh
When developing software applications, time is always of the essence. That’s why agile methodologies have become an inherent part of software development, and why so many technologies and frameworks are doing their best to come up with innovative ways to make development easier and faster for engineers. React Native stands out in this domain thanks to Fast Refresh, a unique feature designed for speed.
Basically, Fast Refresh allows developers to receive instant feedback for changes in the app’s components. Just like in most JavaScript projects, Coinbase takes advantage of this feature through JS bundlers like Metro, which provides sub-second reload cycles, faster startups, and better scalability. All of this results in increased productivity when creating React components and app screens, mainly because of the reduced effort required to manage their visual and iterative nature.
Fast Refresh also makes it possible for Coinbase engineers to manually test code in a few seconds, rather than in the tens of seconds needed to manage context-switching and waiting for the compiler to finish doing its thing. And, as a bonus, this React feature also comes in very handy when developing against API endpoints, since the devs don’t need to configure the app’s state after every change.
React Native Is Secure and Scalable
As a global cryptocurrency exchange, one of Coinbase’s greatest challenges is dealing with the different jurisdictions and regulatory requirements of the 100+ countries it currently supports. Unfortunately, the original native implementation of their app used a series of older and overly complex flows that made it very difficult for the team to support more countries faster and more safely.
React Native’s proven reliability, security features, performance, and native compatibility were the perfect answer to that problem. Even though the Coinbase engineering team ran into a bit of trouble at the beginning of their transition, adopting React Native ultimately made their mobile application more dynamic and more robust—and, best of all, they bypassed the immense trouble of maintaining parity between their iOS and Android apps.
Now, Coinbase can maintain a single, optimized, secure, and scalable sign-up flow across all of its products and platforms, including the Coinbase mobile app, Coinbase Pro, and the Coinbase web app (which, by the way, is also built using React). This way, the company can rely on a strong and secure software ecosystem that’s always up to date and ready to grow.
The Bottom Line
While there are still people who question the use of React Native over traditional native mobile development methods, it’s clear that we are far past the early concerns of the framework and there are very few reasons why not to develop your next mobile application with React Native. In fact, React Native development has been on par with native builds for a long time now, and it even comes with a lot of particular benefits that make mobile software development easier for the devs and more enjoyable for the users.
Coinbase’s satisfaction and growing love for React Native is more than evident, as it has allowed them to deliver features faster than ever while keeping a high bar for software quality, performance, and cybersecurity. What’s more, a few months ago Coinbase began to provide ongoing training in React Native for all its mobile development engineers.
With 1.1M reviews and a 4.7-star rating, the Coinbase React Native app is currently at top of the charts in both the App Store and Google Play. There’s no doubt that the company is on this path for the long-term, and their openness about it has likely inspired tons of other organizations to hire React Native developers and start their own transitions.