Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to start writing UWP apps with React Native?

So there was this big announcement that you can now write Windows apps using React Native.

The announcement links to a Github page which in turn leads to some description on how to install React Windows

After spending a few hours installing Visual Studio and dependencies, SDKs and whatnot, I've got this "ReactNative" solution built in Visual Studio but I still can't figure out how to even start writing a simple Hello World program.

All the documentation points to how to write Android or iOS programs in Visual Studio Code, but there's no indication on how to write a UWP program.

Does anyone know where to start? What is the Visual Studio equivalent of "react-native init"?

like image 534
lyle Avatar asked Apr 15 '16 04:04

lyle


People also ask

Does React Native support UWP?

Overview of React Native React Native is an open-source mobile application framework created by Facebook. It is used to develop applications for Android, iOS, Web and UWP (Windows) providing native UI controls and full access to the native platform.

Is UWP being replaced?

We will replace UWP with WinUI components in our v22. 1 release. UWP controls and demos will be removed from all distributions/installations. We will continue to provide support and minor updates to our UWP controls until December 2022.

What are UWP apps written in?

Use a language you already know UWP apps use the Windows Runtime, the native API provided by the operating system. This API is implemented in C++ and is supported in C#, Visual Basic, C++, and JavaScript. Some options for writing UWP apps include: XAML UI and C#, VB, or C++


1 Answers

After you've run react-native init AwesomeProject

cd AwesomeProject
npm i --save-dev rnpm-plugin-windows
react-native windows

This will generate the Visual Studio solution for your project and the index.windows.js entry point. Visual Studio Code is a great tool for editing React Native JavaScript.

To run your app just run react-native run-windows.

like image 170
Eric Rozell Avatar answered Sep 25 '22 12:09

Eric Rozell