How Coinbase Rewrote the App in React Native

Rate this content
Bookmark

Last year, our team rewrote the Coinbase app from Android/iOS Native to React Native. The new app was launched successfully and with higher quality. The native engineers were re-platformed to React Native, and our productivity has increased. The talk will share our journey from the start of the transition, how we mitigate the risks, and the lessons learned.

This talk has been presented at React Advanced Conference 2021, check out the latest edition of this React Conference.

FAQ

Coinbase decided to rewrite their app in React Native due to the increasing complexity and coordination challenges in their existing native app architecture, difficulty in hiring native engineers, and the availability of a deep talent pool of JavaScript engineers at the company.

The Android app was chosen first because it generated less revenue compared to the iOS app, had fewer features, and had a smaller team of engineers, making it easier to reach feature parity and test the success of the rewrite before moving to iOS.

Coinbase chose a Greenfield approach for the app rewrite, creating a new app from scratch with a separate team. This approach allowed them to avoid the complexity and challenges of integrating new features into the existing app.

Coinbase integrated their existing Android engineers by providing training sessions on React Native and TypeScript, involving them in designing the architecture of the new app, and leveraging their expertise in native modules and the existing code base.

The Coinbase Design System (CDS) is a set of design elements, such as color themes, scaling, layout spacing, and UI components, created to ensure consistency and ease of building the app’s user interface. It allows engineers to focus on functionality rather than UI design.

Coinbase set metrics and guardrails to define success, such as performance benchmarks, user engagement, and revenue metrics. These were used to evaluate project progress, set expectations with management, and make go/no-go decisions during the rollout.

The rewrite project started in March 2020 and took less than a year, with key milestones being an internal dogfood release in July 2020 and the rollout of the Android app in October 2020. The iOS app followed in January 2021.

The key results included no performance regressions, improved cold start time, reduced crash rates, increased user engagement, higher revenue, and improved app ratings, particularly for Android, which saw an increase from 3.8 to 4.4.

Challenges included maintaining performance, deciding the rollout strategy, securing leadership support, retraining native engineers, and ensuring smooth transitions without penalizing performance during the platform switch.

Yes, Coinbase plans to share components and functionality between their website and the React Native app in the long run. They aim to use the same design system and data layers to streamline development and maintain consistency across platforms.

Siriwong (Ching) Wongthongserm
Siriwong (Ching) Wongthongserm
30 min
22 Oct, 2021

Comments

Sign in or register to post your comment.

Video Summary and Transcription

Last year, the Coinbase app was rewritten from native to React Native due to the complexity of the app's architecture. The Android app was chosen for the rewrite and a Brownfield approach was taken to integrate existing Android engineers. The project started in March 2020 and had successful launches for both Android and iOS. The transition to React Native was successful, with increased engineering resources and feature development. Recommendations for React Native include considering the app's requirements, and the best question was about the split between native and React community modules.

1. Coibase App Rewrite in React Native

Short description:

Last year, the Coibase app was rewritten from native to React Native. The decision to rewrite was driven by the complexity of the app's architecture and the challenges in making changes without regression. The team faced difficulties in coordinating across platforms and hiring native engineers. With a deep talent pool of JS engineers, Coibase chose React Native as the solution. The rewrite started with the Android app, which had fewer features and a smaller team compared to iOS.

Hi, everyone, I'm Siri Wong, an engineering manager from Coibase. Last year, I let the Coibase app rewrite from native to React Native, and today I want to share our experience on the journey. So today, I'm going to share about why did we rewrite in React Native, and at the beginning, we approach the rewrite, the project timeline, and key results, and then sharing the challenges and learnings that we have.

So the first question is, why did we rewrite in React Native? At the end of 2019, we observed that our velocity to add a new feature in the Coinbase app is not great. For features, it took several months on each platform and a lot of coordination across teams. This is by no means because the mobile Native technology is bad. However, our app architectures set was too complex and complicated to make any change without fear of regressions. The app has been built with a lot of changes in many, many years. We did try to fix architecture. But it was so hard to fix the foundations while having a lot of pressure to build a new feature at the same time. Also, our teams at that time have about 8 people on Android and 10 people on iOS. Which is divided by the platform at that time. In two teams. It also create communication and consistency challenges. For example, when we build features, we need to check what's another team or another platform is doing. And when there's a bug, we need to check whether it's happening on iOS or Android or both. Hiring is also another challenge. It was really hard to hire native engineers than web engineers at that time. I remember that the whole year we hire maybe one Android engineer or two Android engineers at that time. We did try to convert some of the web engineers to Android, but it wasn't really successful. Also, at Coilbase at that time, we have a lot of deep talent pool of JS engineers. We have a lot of staff engineers on the web side. That makes the React Native a great choice for us. And with all of this, we were thinking about rewriting our Coilbase main app in React Native.

So how did we approach the rewrite? First, we start with the Android app. Why Android app? At that time, our Android app generates less than half of the revenue from iOS. Android app also doesn't have the same feature set as iOS. It has much less features. And so it's easier to reach the feature parity. Also, we have less number of people on Android compared to the number of iOS engineers at that time.

2. Android App Rewrite and Integration

Short description:

The Android app was chosen to be rewritten in React Native due to its complexity and the challenges of making changes without regression. The team decided to do a Brownfield approach, integrating existing Android engineers and training them in React Native. These engineers proved to be invaluable to the project, with their expertise in both the existing codebase and native modules. A code-based design system was created to streamline UI development, and guardrail metrics were set to ensure project success.

So that's why Android app is like what's chosen to be re-write in React Native. And we will see how it happens for React Native before we move to the iOS.

Second, we are talking about should we re-write or should we do Brownfield. And we decided to do Brownfield. And as you can see, we are going to re-write or Greenfield because of the complexity. It's not just the complexity, it's also a lot of several other challenges. For example, if we have a new feature, we need to decide which feature to do in Native, which features we want to do in React Native. If you modify the existing features, should we really try to convert in React Native or Node.js? Those are the questions that we need to decide if we do the brownfield. Also, with the Greenfield, we can create a separate team working on the new app, which is separate from the existing app. So it's easier to reinforce the resource that needed to move forward.

Next is, we integrate existing Android engineers at that time. So the original team composed of six people, and then we bring in two Android engineers, and we train them in React Native. They haven't done any React Native on TypeScript before, so we train them. We host several sessions to design the architect of the new app with the existing Android team to learn more on what data layer that we're going to use, how to error handling, navigations, deep links, or any Native quirks or Native modules that we need to write as part of these rewrites. Then we create the architect and design document to support all of these current use cases that we have on the existing app.

So those engineers, the Android engineers, prove to be incredible value to the project. Not only do they have context on all of these how the app function works inside-out, they can also look up the existing code base when the requirement is not clear. Because we rewrite from scratch, I mean that's going to be a lot of features that no one knows about. They also can work on the native modules since they have the expertise on the native language as well, so this is, these Android engineers were the key to our project success. Before we start, we also create the code-based design system that composes of primitive like what color, theme, scaling, elevation, layout spacing, and components like what's the text button control, logo cells, tabs. Those are the key components, so we can build UI really much easier than building a custom UI or trying to match with the screen-by-screen. And engineers can focus on the functionality than focus on building the UI, and as a result, UI is more consistent, and make it more polished and higher quality. This CDS or corporate design system is the foundation to be used and improve upon even today.

And the last thing that we did was to set the guardrail metrics in the timeline at the beginning. This is so important to set the right expectation especially to the management. It provides the milestone, the transparency on how the project is going. We can evaluate the project progress and provide goal-no-go decision at any given point in time because we already set what to expect. On the metrics and guardrail, it is really important to discuss, even before we start in the project, on what does success look like. Let's say that we want to launch the app tomorrow, what are metrics going to be? Do we expect metrics to stay neutral, to increase or to drop, and how much drop that we can tolerate. Especially for our app, how much revenue on the metrics that we can tolerate, doing the rollout, for example.

QnA

Check out more articles and videos

We constantly think of articles and videos that might spark Git people interest / skill us up or help building a stellar career

A Framework for Managing Technical Debt
TechLead Conference 2023TechLead Conference 2023
35 min
A Framework for Managing Technical Debt
Top Content
Today's Talk discusses the importance of managing technical debt through refactoring practices, prioritization, and planning. Successful refactoring requires establishing guidelines, maintaining an inventory, and implementing a process. Celebrating success and ensuring resilience are key to building a strong refactoring culture. Visibility, support, and transparent communication are crucial for addressing technical debt effectively. The team's responsibilities, operating style, and availability should be transparent to product managers.
Debugging JS
React Summit 2023React Summit 2023
24 min
Debugging JS
Top Content
Watch video: Debugging JS
Debugging JavaScript is a crucial skill that is often overlooked in the industry. It is important to understand the problem, reproduce the issue, and identify the root cause. Having a variety of debugging tools and techniques, such as console methods and graphical debuggers, is beneficial. Replay is a time-traveling debugger for JavaScript that allows users to record and inspect bugs. It works with Redux, plain React, and even minified code with the help of source maps.
Building a Voice-Enabled AI Assistant With Javascript
JSNation 2023JSNation 2023
21 min
Building a Voice-Enabled AI Assistant With Javascript
Top Content
This Talk discusses building a voice-activated AI assistant using web APIs and JavaScript. It covers using the Web Speech API for speech recognition and the speech synthesis API for text to speech. The speaker demonstrates how to communicate with the Open AI API and handle the response. The Talk also explores enabling speech recognition and addressing the user. The speaker concludes by mentioning the possibility of creating a product out of the project and using Tauri for native desktop-like experiences.
Power Fixing React Performance Woes
React Advanced Conference 2023React Advanced Conference 2023
22 min
Power Fixing React Performance Woes
Top Content
Watch video: Power Fixing React Performance Woes
This Talk discusses various strategies to improve React performance, including lazy loading iframes, analyzing and optimizing bundles, fixing barrel exports and tree shaking, removing dead code, and caching expensive computations. The speaker shares their experience in identifying and addressing performance issues in a real-world application. They also highlight the importance of regularly auditing webpack and bundle analyzers, using tools like Knip to find unused code, and contributing improvements to open source libraries.
A Practical Guide for Migrating to Server Components
React Advanced Conference 2023React Advanced Conference 2023
28 min
A Practical Guide for Migrating to Server Components
Top Content
Watch video: A Practical Guide for Migrating to Server Components
React query version five is live and we'll be discussing the migration process to server components using Next.js and React Query. The process involves planning, preparing, and setting up server components, migrating pages, adding layouts, and moving components to the server. We'll also explore the benefits of server components such as reducing JavaScript shipping, enabling powerful caching, and leveraging the features of the app router. Additionally, we'll cover topics like handling authentication, rendering in server components, and the impact on server load and costs.
Monolith to Micro-Frontends
React Advanced Conference 2022React Advanced Conference 2022
22 min
Monolith to Micro-Frontends
Top Content
Microfrontends are considered as a solution to the problems of exponential growth, code duplication, and unclear ownership in older applications. Transitioning from a monolith to microfrontends involves decoupling the system and exploring options like a modular monolith. Microfrontends enable independent deployments and runtime composition, but there is a discussion about the alternative of keeping an integrated application composed at runtime. Choosing a composition model and a router are crucial decisions in the technical plan. The Strangler pattern and the reverse Strangler pattern are used to gradually replace parts of the monolith with the new application.

Workshops on related topic

Build Modern Applications Using GraphQL and Javascript
Node Congress 2024Node Congress 2024
152 min
Build Modern Applications Using GraphQL and Javascript
Featured Workshop
Emanuel Scirlet
Miguel Henriques
2 authors
Come and learn how you can supercharge your modern and secure applications using GraphQL and Javascript. In this workshop we will build a GraphQL API and we will demonstrate the benefits of the query language for APIs and what use cases that are fit for it. Basic Javascript knowledge required.
Introducing FlashList: Let's build a performant React Native list all together
React Advanced Conference 2022React Advanced Conference 2022
81 min
Introducing FlashList: Let's build a performant React Native list all together
Top Content
WorkshopFree
David Cortés Fulla
Marek Fořt
Talha Naqvi
3 authors
In this workshop you’ll learn why we created FlashList at Shopify and how you can use it in your code today. We will show you how to take a list that is not performant in FlatList and make it performant using FlashList with minimum effort. We will use tools like Flipper, our own benchmarking code, and teach you how the FlashList API can cover more complex use cases and still keep a top-notch performance.You will know:- Quick presentation about what FlashList, why we built, etc.- Migrating from FlatList to FlashList- Teaching how to write a performant list- Utilizing the tools provided by FlashList library (mainly the useBenchmark hook)- Using the Flipper plugins (flame graph, our lists profiler, UI & JS FPS profiler, etc.)- Optimizing performance of FlashList by using more advanced props like `getType`- 5-6 sample tasks where we’ll uncover and fix issues together- Q&A with Shopify team
Detox 101: How to write stable end-to-end tests for your React Native application
React Summit 2022React Summit 2022
117 min
Detox 101: How to write stable end-to-end tests for your React Native application
Top Content
WorkshopFree
Yevheniia Hlovatska
Yevheniia Hlovatska
Compared to unit testing, end-to-end testing aims to interact with your application just like a real user. And as we all know it can be pretty challenging. Especially when we talk about Mobile applications.
Tests rely on many conditions and are considered to be slow and flaky. On the other hand - end-to-end tests can give the greatest confidence that your app is working. And if done right - can become an amazing tool for boosting developer velocity.
Detox is a gray-box end-to-end testing framework for mobile apps. Developed by Wix to solve the problem of slowness and flakiness and used by React Native itself as its E2E testing tool.
Join me on this workshop to learn how to make your mobile end-to-end tests with Detox rock.
Prerequisites- iOS/Android: MacOS Catalina or newer- Android only: Linux- Install before the workshop
How to Build an Interactive “Wheel of Fortune” Animation with React Native
React Summit Remote Edition 2021React Summit Remote Edition 2021
60 min
How to Build an Interactive “Wheel of Fortune” Animation with React Native
Top Content
Workshop
Oli Bates
Oli Bates
- Intro - Cleo & our mission- What we want to build, how it fits into our product & purpose, run through designs- Getting started with environment set up & “hello world”- Intro to React Native Animation- Step 1: Spinning the wheel on a button press- Step 2: Dragging the wheel to give it velocity- Step 3: Adding friction to the wheel to slow it down- Step 4 (stretch): Adding haptics for an immersive feel
Building a Shopify App with React & Node
React Summit Remote Edition 2021React Summit Remote Edition 2021
87 min
Building a Shopify App with React & Node
Top Content
WorkshopFree
Jennifer Gray
Hanna Chen
2 authors
Shopify merchants have a diverse set of needs, and developers have a unique opportunity to meet those needs building apps. Building an app can be tough work but Shopify has created a set of tools and resources to help you build out a seamless app experience as quickly as possible. Get hands on experience building an embedded Shopify app using the Shopify App CLI, Polaris and Shopify App Bridge.We’ll show you how to create an app that accesses information from a development store and can run in your local environment.
Deploying React Native Apps in the Cloud
React Summit 2023React Summit 2023
88 min
Deploying React Native Apps in the Cloud
WorkshopFree
Cecelia Martinez
Cecelia Martinez
Deploying React Native apps manually on a local machine can be complex. The differences between Android and iOS require developers to use specific tools and processes for each platform, including hardware requirements for iOS. Manual deployments also make it difficult to manage signing credentials, environment configurations, track releases, and to collaborate as a team.
Appflow is the cloud mobile DevOps platform built by Ionic. Using a service like Appflow to build React Native apps not only provides access to powerful computing resources, it can simplify the deployment process by providing a centralized environment for managing and distributing your app to multiple platforms. This can save time and resources, enable collaboration, as well as improve the overall reliability and scalability of an app.
In this workshop, you’ll deploy a React Native application for delivery to Android and iOS test devices using Appflow. You’ll also learn the steps for publishing to Google Play and Apple App Stores. No previous experience with deploying native applications is required, and you’ll come away with a deeper understanding of the mobile deployment process and best practices for how to use a cloud mobile DevOps platform to ship quickly at scale.