Hello, everyone, and welcome! My name is Kiki St. Ong. I've been with Microsoft for about five years now on the Windows UI Platform Team and have recently been helping drive the React Native for Windows and Mac efforts with that team. I am Eloi Duran, or Eloi. I have been using React Native professionally since early 2016 and have joined the Microsoft Office team in December to help them out with their React Native efforts.
Today, we'll be giving you a brief, very brief talk about React Native for Windows and Mac and that effort. Today, we'll be talking about how to, sort of our focus around that, why we chose to add it, how to set up in Windows and Mac, and then Eloi will be taking us through a more in-depth look at installing that, installing a community module running on both Windows and Mac, and just sort of the dev experience there. Then I'll go over future modules and sort of how we want to support the community modules in the future with React Native. And then we will cover some resources and wrap up.
So, as many of you may know, React Native originally started out as a way to bring JavaScript-based apps cross-platform to both Android and iOS. Of course, we're always looking for ways to bring more developers to Windows, and we saw this as an opportunity, this framework as a great opportunity to entice web devs to experiment with the native Windows app development while still being able to utilize their skills and tools that they're used to. In adding support for Windows, there was a lot of gaps that we needed to fill in order to make it work great on our platform, so we added things like pen, mouse, and keyboard, that kind of support was added, as well as support for other Windows devices, like Xbox and dual screen. But as we were doing this work, we realized that there was actually a lot of crossover between what we were writing for Windows and that desktop experience and what macOS has. In fact, a lot of APIs, inputs, and even just general tools and functionality that we had written and enabled to work great for React Native for Windows matched very closely in behavior to what was needed to light up that same experience on Mac. So they took this realization as an opportunity to not only give back to the React Native community by driving the React Native for Mac effort, but also as a secondary opportunity to be a leader in the React Native space when it comes to cross-platform development for desktop experiences specifically. And that's what we're going to be focusing on today.
Now I'm going to pass this off to Eloy, who is going to show us how to do this in code. Thanks, Kiki. For the sake of time, because we have very little time, I'm going to be going through this as quickly as possible. So to create a macOS or Windows React Native application, we start with the normal template. You may also want to have an iOS, an Android application, etc. So those are all in the default template. This should not be new to anybody creating React Native applications already. So now we wait for the template to be downloaded. Great. And so now we can move on to adding the macOS bits. We do that using the npx React Native macOS init command. And before we continue, I'm going to already add another dependency, which is a dependency that has a native module that supports both macOS and Windows. Okay, let's go ahead and open this up in VS Code. As you can see, we've now added our macOS fork and also this native module.
Comments