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.

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 Conference 2023React Advanced Conference 2023
33 min
React Compiler - Understanding Idiomatic React (React Forget)
Top Content
React provides a contract to developers- uphold certain rules, and React can efficiently and correctly update the UI. In this talk we'll explore these rules in depth, understanding the reasoning behind them and how they unlock new directions such as automatic memoization. 
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
Too much JavaScript is getting you down? New frameworks promising no JavaScript look interesting, but you have an existing React application to maintain. What if Qwik React is your answer for faster applications startup and better user experience? Qwik React allows you to easily turn your React application into a collection of islands, which can be SSRed and delayed hydrated, and in some instances, hydration skipped altogether. And all of this in an incremental way without a rewrite.
SolidJS: Why All the Suspense?
JSNation 2023JSNation 2023
28 min
SolidJS: Why All the Suspense?
Top Content
Solid caught the eye of the frontend community by re-popularizing reactive programming with its compelling use of Signals to render without re-renders. We've seen them adopted in the past year in everything from Preact to Angular. Signals offer a powerful set of primitives that ensure that your UI is in sync with your state independent of components. A universal language for the frontend user interface.
But what about Async? How do we manage to orchestrate data loading and mutation, server rendering, and streaming? Ryan Carniato, creator of SolidJS, takes a look at a different primitive. One that is often misunderstood but is as powerful in its use. Join him as he shows what all the Suspense is about.
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
We all love GraphQL, but it can be daunting to get a server up and running and keep your code organized, maintainable, and testable over the long term. No more! Come watch as I go from an empty directory to a fully fledged GraphQL API in minutes flat. Plus, see how easy it is to use and create directives to clean up your code even more. You're gonna love GraphQL even more once you make things Redwood Easy!
Jotai Atoms Are Just Functions
React Day Berlin 2022React Day Berlin 2022
22 min
Jotai Atoms Are Just Functions
Top Content
Jotai is a state management library. We have been developing it primarily for React, but it's conceptually not tied to React. It this talk, we will see how Jotai atoms work and learn about the mental model we should have. Atoms are framework-agnostic abstraction to represent states, and they are basically just functions. Understanding the atom abstraction will help designing and implementing states in your applications with Jotai
A Framework for Managing Technical Debt
TechLead Conference 2023TechLead Conference 2023
35 min
A Framework for Managing Technical Debt
Top Content
Let’s face it: technical debt is inevitable and rewriting your code every 6 months is not an option. Refactoring is a complex topic that doesn't have a one-size-fits-all solution. Frontend applications are particularly sensitive because of frequent requirements and user flows changes. New abstractions, updated patterns and cleaning up those old functions - it all sounds great on paper, but it often fails in practice: todos accumulate, tickets end up rotting in the backlog and legacy code crops up in every corner of your codebase. So a process of continuous refactoring is the only weapon you have against tech debt.In the past three years, I’ve been exploring different strategies and processes for refactoring code. In this talk I will describe the key components of a framework for tackling refactoring and I will share some of the learnings accumulated along the way. Hopefully, this will help you in your quest of improving the code quality of your codebases.

Workshops on related topic

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.
Build a chat room with Appwrite and React
JSNation 2022JSNation 2022
41 min
Build a chat room with Appwrite and React
WorkshopFree
Wess Cope
Wess Cope
API's/Backends are difficult and we need websockets. You will be using VS Code as your editor, Parcel.js, Chakra-ui, React, React Icons, and Appwrite. By the end of this workshop, you will have the knowledge to build a real-time app using Appwrite and zero API development. Follow along and you'll have an awesome chat app to show off!
Effective Detox Testing
React Advanced Conference 2023React Advanced Conference 2023
159 min
Effective Detox Testing
Workshop
Josh Justice
Josh Justice
So you’ve gotten Detox set up to test your React Native application. Good work! But you aren’t done yet: there are still a lot of questions you need to answer. How many tests do you write? When and where do you run them? How do you ensure there is test data available? What do you do about parts of your app that use mobile APIs that are difficult to automate? You could sink a lot of effort into these things—is the payoff worth it?
In this three-hour workshop we’ll address these questions by discussing how to integrate Detox into your development workflow. You’ll walk away with the skills and information you need to make Detox testing a natural and productive part of day-to-day development.
Table of contents:
- Deciding what to test with Detox vs React Native Testing Library vs manual testing- Setting up a fake API layer for testing- Getting Detox running on CI on GitHub Actions for free- Deciding how much of your app to test with Detox: a sliding scale- Fitting Detox into you local development workflow
Prerequisites
- Familiarity with building applications with React Native- Basic experience with Detox- Machine setup: a working React Native CLI development environment including either Xcode or Android Studio