Shopify goes all in on React Native for mobile development 3 years after Airbnb dropped it like 3rd-grade French
Commerce platform should have a better time, right?
Shopify, a commerce platform that claims over a million businesses as customers, is going "full steam ahead" in shifting all its mobile development to React Native.
In a detailed post, Shopify engineering veep Farhan Thawar explained why the team is changing from its present policy of native mobile development to use a cross-platform framework and React Native in particular.
He sees this as an "early technology bet" that parallels other choices the company has made, such as Ruby on Rails for its web application and Google Cloud for its IT infrastructure.
In November 2018, Shopify acquired the online marketplace Tictail, whose developers already used React Native. This, along with improvements in the framework, motivated Shopify to follow suit. The team analysed other options including Google's Flutter and continuing with native development. However, Thawar said that Shopify native apps will not necessarily be rewritten – "that's a decision each app team makes independently" – and that it will continue to use native code for custom platform-specific components and contributing back to the project. In addition, there will be instances where native development is preferred, such as for intensive processing or low-end hardware.
One project that did get rewritten is an order-tracking application called Arrive. Originally there was no Android version, only iOS. The rewrite shares 95 per cent code between Android and iOS, is more stable on iOS than the old native version, and "the team felt that they were twice as productive than using native development," claimed Thawar.
In 2016, Airbnb "took a big bet on React Native", said Gabriel Peal, who was a senior software engineer there at the time. It did not work out, and in 2018 Peal announced that "we will be sunsetting React Native".
This was three years ago and React Native is more mature today. In addition, some of Airbnb's issues were organisational rather than technical. Peal said that the opinions of team members about React Native were polarised. TypeScript is well supported in React Native, overcoming the type safety issue. The experience at Airbnb is no reason to presume that it will work out badly at Shopify, though it does illustrate that using a cross-platform framework always has costs as well as benefits.