{"id":38067,"date":"2023-01-05T16:00:20","date_gmt":"2023-01-05T21:00:20","guid":{"rendered":"https:\/\/mjtsai.com\/blog\/?p=38067"},"modified":"2023-01-05T16:01:16","modified_gmt":"2023-01-05T21:01:16","slug":"shopify-migrating-to-react-native","status":"publish","type":"post","link":"https:\/\/mjtsai.com\/blog\/2023\/01\/05\/shopify-migrating-to-react-native\/","title":{"rendered":"Shopify Migrating to React Native"},"content":{"rendered":"<p><a href=\"https:\/\/shopify.engineering\/react-native-future-mobile-shopify\">Farhan Thawar<\/a> (in January 2020):<\/p>\n<blockquote cite=\"https:\/\/shopify.engineering\/react-native-future-mobile-shopify\"><p>After years of native mobile development, we&rsquo;ve decided to go full steam ahead building all of our new mobile apps using React Native.<\/p><p>[&#8230;]<\/p><p>At Shopify, the idea had its skeptics at the time (and still does), but many saw its promise. At the company&rsquo;s next <a href=\"https:\/\/twitter.com\/ShannonKarleen\/status\/1204881060213002240?s=20\" title=\"Shannon Gallagher on Twitter\">Hackdays<\/a> the entire company spent time on React Native. While the early team saw many benefits, they decided that we couldn&rsquo;t ship an app we&rsquo;d be proud of using React Native in 2015. For the most part, this had to do with performance and the absence of first-class Android support. What we did learn was that we liked the <a href=\"https:\/\/en.wikipedia.org\/wiki\/Reactive_programming\" title=\"Reactive Programming - Wikipedia\">Reactive programming<\/a> model and <a href=\"https:\/\/help.shopify.com\/en\/api\/getting-started\/shopify-and-graphql\/graphql-benefits\" title=\"GraphQL Benefits\">GraphQL<\/a>. Also, we built and open-sourced a <a href=\"https:\/\/github.com\/Shopify\/FunctionalTableData\" title=\"FunctionalTableData on GitHub\">functional rendere<\/a>r for iOS after working with React Native. We adopted these technologies in 2015 for our native mobile stack, but not React Native for mobile development en masse. <a href=\"https:\/\/www.theglobeandmail.com\/report-on-business\/how-shopify-finally-got-smart-about-mobile\/article33184093\/\" title=\"Shopify Grows Up\">The Globe and Mail documented our aspirations<\/a> in a comprehensive story about the first version of our mobile apps.<\/p><p>[&#8230;]<\/p><p>we learned from our acquisition of Tictail (a mobile first company that focused 100% on React Native) in 2018 how far React Native has come and made 3 deep product investments in 2019<\/p><p>[&#8230;]<\/p><p>in rewriting the Arrive app in React Native, the team felt that they were twice as productive than using native development&mdash;even just on one mobile platform<\/p><p>[&#8230;]<\/p><p>As an aside, even though we&rsquo;re making the decision to build all new apps using React Native, that doesn&rsquo;t mean we&rsquo;ll automatically start rewriting our old apps in React Native.<\/p><\/blockquote>\n\n<p><a href=\"https:\/\/shopify.engineering\/migrating-our-largest-mobile-app-to-react-native\">Mauricio de Meirelles<\/a> (via <a href=\"https:\/\/mastodon.social\/@sandofsky\/109628715733638445\">Ben Sandofsky<\/a>):<\/p>\n<blockquote cite=\"https:\/\/shopify.engineering\/migrating-our-largest-mobile-app-to-react-native\"><p>After a thorough evaluation, it became clear that we couldn&rsquo;t fix these issues [with Shopify Point of Sale] with incremental changes. Hence, we decided to do a full rewrite, which has been a big hit with our merchants.<\/p><p>[&#8230;]<\/p><p>Having all mobile teams use a single tech stack and tooling across the company gives you an incredible amount of leverage. We didn&rsquo;t want Shopify Mobile to miss out on all the shared libraries, components, and tooling that other apps were benefiting from. So, we decided to gradually start adopting React Native in the app instead of doing a full rewrite.<\/p><p>[&#8230;]<\/p><p>After evaluating several options, we decided to go with an approach we like to call &ldquo;Iterative Porting&rdquo;. In this approach we started building <strong>all<\/strong> new features in React Native <strong>and<\/strong> migrating existing features in parallel.<\/p><p>[&#8230;]<\/p><p>Now that our root screens are ported and most of the necessary infrastructure is in place, I&rsquo;m noticing that the ports are picking up speed! Most of our developers didn&rsquo;t know React Native before this project, so each day they learn more, which further contributes to the fast pace.<\/p><\/blockquote>\n\n<p><a href=\"https:\/\/mastodon.social\/@gfoster@hachyderm.io\/109632029866089845\">Geoff Foster<\/a>:<\/p>\n<blockquote cite=\"https:\/\/mastodon.social\/@gfoster@hachyderm.io\/109632029866089845\">\n<p>I&rsquo;m one of the original iOS developers on that app. Left about 6 months after the move to RN announcement having fought against that for years and no longer able to stop it from happening.<\/p>\n<p>We started with about 8 people doing the GraphQL backend, design, native iOS and Android and shipped good stuff fast. Scaled everything well over the years with a solid tech stack.<\/p>\n<p>I open the app now and again and can instantly tell where the RN screens are because of the weird glitches and bugs<\/p>\n<\/blockquote>\n\n<p><a href=\"https:\/\/twitter.com\/migueldeicaza\/status\/1610665502598127616\">Miguel de Icaza<\/a>:<\/p>\n<blockquote cite=\"https:\/\/twitter.com\/migueldeicaza\/status\/1610665502598127616\">\n<p>Rewrites never go as planned.<\/p>\n<p>Xamarin.Forms turning into Maui was supposed to be a quick change, fueled by hopium so strong it defied gravity.<\/p>\n<p>Instead, at best, it set it back 2-3 years.<\/p>\n<\/blockquote>\n\n<p>Previously:<\/p>\n<ul>\n<li><a href=\"https:\/\/mjtsai.com\/blog\/2022\/02\/10\/micro-blog-moving-ios-app-to-react-native\/\">Micro.blog Moving iOS App to React Native<\/a><\/li>\n<li><a href=\"https:\/\/mjtsai.com\/blog\/2020\/03\/05\/rewriting-facebook-messenger\/\">Rewriting Facebook Messenger<\/a><\/li>\n<li><a href=\"https:\/\/mjtsai.com\/blog\/2018\/06\/21\/airbnb-switching-away-from-react-native\/\">Airbnb Switching Away From React Native<\/a><\/li>\n<li><a href=\"https:\/\/mjtsai.com\/blog\/2017\/02\/08\/swift-and-react-native-at-artsy\/\">Swift and React Native at Artsy<\/a><\/li>\n<\/ul>","protected":false},"excerpt":{"rendered":"<p>Farhan Thawar (in January 2020): After years of native mobile development, we&rsquo;ve decided to go full steam ahead building all of our new mobile apps using React Native.[&#8230;]At Shopify, the idea had its skeptics at the time (and still does), but many saw its promise. At the company&rsquo;s next Hackdays the entire company spent time [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"apple_news_api_created_at":"2023-01-05T21:00:26Z","apple_news_api_id":"c5dab146-b187-4ccf-8b49-4a84023c2574","apple_news_api_modified_at":"2023-01-05T21:01:18Z","apple_news_api_revision":"AAAAAAAAAAAAAAAAAAAAAA==","apple_news_api_share_url":"https:\/\/apple.news\/AxdqxRrGHTM-LSUqEAjwldA","apple_news_coverimage":0,"apple_news_coverimage_caption":"","apple_news_is_hidden":false,"apple_news_is_paid":false,"apple_news_is_preview":false,"apple_news_is_sponsored":false,"apple_news_maturity_rating":"","apple_news_metadata":"\"\"","apple_news_pullquote":"","apple_news_pullquote_position":"","apple_news_slug":"","apple_news_sections":"\"\"","apple_news_suppress_video_url":false,"apple_news_use_image_component":false,"footnotes":""},"categories":[2],"tags":[248,249,31,2185,26,1249,2105,2074],"class_list":["post-38067","post","type-post","status-publish","format-standard","hentry","category-technology","tag-android","tag-androidapp","tag-ios","tag-ios-16","tag-iosapp","tag-react-native","tag-shopify","tag-software-rewrite"],"apple_news_notices":[],"_links":{"self":[{"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/posts\/38067","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/comments?post=38067"}],"version-history":[{"count":2,"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/posts\/38067\/revisions"}],"predecessor-version":[{"id":38071,"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/posts\/38067\/revisions\/38071"}],"wp:attachment":[{"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/media?parent=38067"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/categories?post=38067"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/tags?post=38067"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}