Raising the Bar: Our Journey Making React Native a Preferred Choice

Rate this content
Bookmark

At Microsoft, we're committed to providing our teams with the best tools and technologies to build high-quality mobile applications. React Native has long been a preferred choice for its high performance and great user experience, but getting stakeholders on board can be a challenge. In this talk, we will share our journey of making React Native a preferred choice for stakeholders who prioritize ease of integration and developer experience. We'll discuss the specific strategies we used to achieve our goal and the results we achieved.

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

Watch video on a separate page

FAQ

The main topic is about improving the developer experience and raising the bar for using React Native at Microsoft.

At Microsoft, React Native is used across various platforms including mobile apps, MacOS, and Windows. It is also used in many of Microsoft's biggest mobile apps, often in a Brownfield approach where parts of the app are native and other parts use React Native.

The Microsoft Galaxy concept refers to the idea that Microsoft has many different monorepos interacting with each other, which increases the complexity of using React Native. The goal is to ensure that code can be seamlessly shared and used across different projects and platforms within the company.

The React Native test app is a sandbox environment designed to abstract away most of the pain points of using a vanilla React Native app. It supports multiple versions of React Native and various platforms including iOS, Android, MacOS, and Windows.

Microsoft is exploring the implementation of web APIs for React Native, aiming to allow web code to work seamlessly across iOS, Android, MacOS, and Windows. This approach is still experimental and will take years to be production-ready.

The demo was to showcase how quickly and effortlessly developers can upgrade React Native versions using the tools provided by RNX Kit, particularly focusing on the 'aligned apps' command and the ease of switching between different React Native versions.

Upcoming features include the implementation of more web APIs, such as the storage API, and continued improvements in developer tools like tree shaking for Metro and better support for monorepos and TypeScript.

The speaker is Lorenzo Chandra, also known as Calcet, a senior software engineer at Microsoft and a maintainer for React Native since 2018.

Some challenges include managing different needs and versions of React Native across hundreds of engineers and projects, keeping bundle sizes within store policies, and ensuring code works seamlessly when moved between different monorepos.

RNX Kit is a monorepo that contains various tools and plugins to improve the developer experience for React Native at Microsoft. It includes features like tree shaking for Metro, custom Babel and ESLint profiles, and a drop-in replacement for the CLI with additional tweaks and flags.

Lorenzo Sciandra
Lorenzo Sciandra
29 min
20 Oct, 2023

Comments

Sign in or register to post your comment.
Video Summary and Transcription
This Talk discusses Rack Native at Microsoft and the efforts to improve code integration, developer experience, and leadership goals. The goal is to extend Rack Native to any app, utilize web code, and increase developer velocity. Implementing web APIs for React Native is being explored, as well as collaboration with Meta. The ultimate aim is to make web code into universal code and enable developers to write code once and have it work on all platforms.

1. Introduction to Rack Native at Microsoft

Short description:

I'm here today to talk about raising the bar. My name is Calcet, a maintainer for Rack Native at Microsoft. We use Rack Native in our biggest mobile apps, as well as on other platforms like Mac OS and Windows. We had a talk at Chain React about using and maintaining Rack Native for desktop. We also introduced the concept of the Microsoft Galaxy, with multiple Monorepos.

Why are you here? This is Zytrack. Go, go have fun. No, thank you for being here. I really appreciate you all. And well, as our lovely MC already said, I'm here today to talk about raising the bar. So, let's jump right into it.

She's already also mentioned that my name is Lorenzo Chandra. This is my face, but maybe you recognize me more like this. My name is Calcet. I've been a maintainer for Rack Native since 2018. I'm a senior software engineer at Microsoft. And what I want to talk about today is basically the journey that internally at Microsoft, me, and a few colleagues have been going through.

You see, our job, specifically me and my colleagues, is to be invisible. And you can be like, well, you suck at that. You're on stage. I can see you. You're already failing. And like, yeah, fair enough. But let me give you a bit of an explanation. So, first off, when you think about Rack Native, of course, you think about mobile apps. And at Microsoft, yes, we do use Rack Native a lot in some of our biggest mobile apps. Of course, these are mostly Brownfield apps. So, we have some parts native and some parts in Rack Native. But not only that, we actually do use Rack Native on all the other platforms that you can think of. We use it for Mac OS and Windows. And we had a talk at Chain React earlier this year from two of my colleagues, Chiara and Shivyan. And I would highly recommend you watch it because it really dives into the desktop aspect of using and maintaining Rack Native for those platforms. But not only that, a few years back, we did introduce the concept of the Microsoft Galaxy. You see, Microsoft is a big company. We don't only have one Monorepo, we have many of them.

2. Solutions for Seamless Code Integration

Short description:

When working on Rack Native, we ensure seamless code integration across different apps and Monorepos. Our goal is to enable developers to leverage the tooling instead of fighting with it. Challenges like varying needs, different versions of Rack Native, and bundle size are addressed through our solutions, including the React Native test app. This sandbox app abstracts away the pain points of using a vanilla React Native app and supports multiple versions. It also supports the new architecture and offers an experimental single app mode. Our solutions cover iOS, Android, MacOS, and Windows platforms.

And when we work on Rack Native, of course, you want to have something that can be used across different apps. So, for example, I think we recently have done the full rollout of one of the main Rack Native experiences across all the main apps. And for that to happen, basically, we have all these different Monorepos interacting with each other, but that increases the complexity of using Rack Native by quite a bit.

So, that's where me and my colleagues come in. We basically make sure that all these different parts of the galaxy, all these different planets can use the code, can take the code from one Monorepo, put it in the other one, and everything should work. So, we are invisible in that sense, because we want people to flawlessly be able to work on their code, and then that code to go into the final app, into what we call a host app, usually the products that you use.

To say in a more proper term though, what we try to do is basically enable developers working on our products to leverage the tooling instead of fighting with it. And you're all, well, some of you are Rack Native developers, so probably you know that there can be potential pain points. And at Microsoft, we have a few that are very specific to this Galaxy approach that we have. So, when we have hundreds of engineers spread across many different projects, if everyone has different needs, if they use different versions of Rack Native, different versions of their libraries, that creates a problem.

If the bundle size is too big, that's definitely a problem, because our apps like Office, that's one app for, you know, Word, Excel, PowerPoint, like all in one mobile app, as you know, like there are some policies on the stores. So, we're always like, just write below that, and we need to keep it there of course. And you know, upgrading, we all know the story when it comes to upgrading, I see everyone is just like, oh my god. And I'm sorry, it's partly my fault, we're trying to be making better. But yeah, and sometimes the code doesn't work, like it works on your site, on your monorepo where you do development, and then you, you know, send it to Outlook and then they put it into their code base and it doesn't work.

So, a lot of these things, of course, cannot be necessarily solved at the core level. So, by sending PRs against React Native, sometimes we need to take things into our own hands. And to do that, we have been working on two main solutions. The first one is what we call the test bench. This is called the React Native test app, and it's basically a sandbox React Native app where we have abstracted away, 99.9% of the pain points of using a vanilla React Native app. This one supports from 64 to 72, and we're working on 73, and basically this means that you have the sandbox and you can very quickly, and I'll show you in a bit, swap from one version of React Native to the other so that in your test environment, you can verify that all the versions that your host apps are using, their code is going to work, basically.

It does support the new architecture. It supports the Xfce cloud config plugins. We're trying to make it as usable as possible for the community, too. And we also have an experimental single app mode. So if you have a small project side thing that you want to try to put into a different vanilla React Native app, please talk to me, because we're looking for sacrifices, people we can have a partnership with and try these things out. And of course, it's not just for iOS and Android. We care about MacOS and Windows, too. So out of the box, you throw your code in there and it works across all these different platforms. You don't need to take care of those.

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

React Compiler - Understanding Idiomatic React (React Forget)
React Advanced 2023React Advanced 2023
33 min
React Compiler - Understanding Idiomatic React (React Forget)
Top Content
Watch video: React Compiler - Understanding Idiomatic React (React Forget)
Joe Savona
Mofei Zhang
2 authors
The Talk discusses React Forget, a compiler built at Meta that aims to optimize client-side React development. It explores the use of memoization to improve performance and the vision of Forget to automatically determine dependencies at build time. Forget is named with an F-word pun and has the potential to optimize server builds and enable dead code elimination. The team plans to make Forget open-source and is focused on ensuring its quality before release.
Speeding Up Your React App With Less JavaScript
React Summit 2023React Summit 2023
32 min
Speeding Up Your React App With Less JavaScript
Top Content
Watch video: Speeding Up Your React App With Less JavaScript
Mishko, the creator of Angular and AngularJS, discusses the challenges of website performance and JavaScript hydration. He explains the differences between client-side and server-side rendering and introduces Quik as a solution for efficient component hydration. Mishko demonstrates examples of state management and intercommunication using Quik. He highlights the performance benefits of using Quik with React and emphasizes the importance of reducing JavaScript size for better performance. Finally, he mentions the use of QUIC in both MPA and SPA applications for improved startup performance.
SolidJS: Why All the Suspense?
JSNation 2023JSNation 2023
28 min
SolidJS: Why All the Suspense?
Top Content
Suspense is a mechanism for orchestrating asynchronous state changes in JavaScript frameworks. It ensures async consistency in UIs and helps avoid trust erosion and inconsistencies. Suspense boundaries are used to hoist data fetching and create consistency zones based on the user interface. They can handle loading states of multiple resources and control state loading in applications. Suspense can be used for transitions, providing a smoother user experience and allowing prioritization of important content.
From GraphQL Zero to GraphQL Hero with RedwoodJS
GraphQL Galaxy 2021GraphQL Galaxy 2021
32 min
From GraphQL Zero to GraphQL Hero with RedwoodJS
Top Content
Tom Pressenwurter introduces Redwood.js, a full stack app framework for building GraphQL APIs easily and maintainably. He demonstrates a Redwood.js application with a React-based front end and a Node.js API. Redwood.js offers a simplified folder structure and schema for organizing the application. It provides easy data manipulation and CRUD operations through GraphQL functions. Redwood.js allows for easy implementation of new queries and directives, including authentication and limiting access to data. It is a stable and production-ready framework that integrates well with other front-end technologies.
Jotai Atoms Are Just Functions
React Day Berlin 2022React Day Berlin 2022
22 min
Jotai Atoms Are Just Functions
Top Content
State management in React is a highly discussed topic with many libraries and solutions. Jotai is a new library based on atoms, which represent pieces of state. Atoms in Jotai are used to define state without holding values and can be used for global, semi-global, or local states. Jotai atoms are reusable definitions that are independent from React and can be used without React in an experimental library called Jotajsx.
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.

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 2022React Advanced 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.