You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+8-11Lines changed: 8 additions & 11 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,19 +1,16 @@
1
-
# The JS/WinRT language projection
1
+
# React Native WinRT
2
2
3
-
JavaScript WinRT (JS/WinRT) is a module for React Native Windows which provides access to WinRT APIs from Javascript. It uses components from [xlang](https://github.com/Microsoft/xlang) to [parse metadata](https://github.com/microsoft/winmd) for public or private WinRT COM APIs and generate JSI (JavaScript Interface) wrappers for [C++/WinRT](https://github.com/microsoft/cppwinrt) types at compile-time and the code generator was itself derived from `cppwinrt.exe`.
3
+
React Native WinRT is a module for [React Native for Windows](https://microsoft.github.io/react-native-windows/) developers who want to call native (non-XAML) WinRT APIs in their apps. It uses components from [xlang](https://github.com/Microsoft/xlang) to [parse metadata](https://github.com/microsoft/winmd) for public or private WinRT COM APIs and generate JSI (JavaScript Interface) wrappers for [C++/WinRT](https://github.com/microsoft/cppwinrt) types at compile-time. The code generator was itself derived from `cppwinrt.exe`.
4
4
5
-
## Building JS/WinRT Sample
5
+
This repo generates the **Microsoft.ReactNative.WinRT** NuGet package for specific versions of React Native Windows.
6
6
7
-
- Open a dev command prompt pointing at the root of the repo.
8
-
- Run `npm install` under ["\samples\RNWinRTTestApp\"](./samples/RNWinRTTestApp)
9
-
- Open the [`RNWinRTTestApp.sln`](./samples/RNWinRTTestApp/windows/RNWinRTTestApp.sln) solution.
10
-
- Build the x64 Release or Debug configuration.
11
-
- If running Debug: Run 'yarn start' under ["\samples\RNWinRTTestApp\"](./samples/RNWinRTTestApp)
12
-
- F5 deploy the sample app.
7
+
## Getting started
13
8
14
-
## Usage
9
+
Refer to the [usage docs](docs/USAGE.md) for instructions on how to use React Native WinRT in your React Native Windows app to call projected WinRT APIs in Javascript.
15
10
16
-
Refer to the [usage docs](docs/USAGE.md) for instructions on how to use react-native-winrt in your React Native Windows app to call projected WinRT APIs in Javascript.
11
+
### Sample code
12
+
13
+
See the [sample app](/samples/RNWinRTTestApp/) for an example of using the **Microsoft.ReactNative.WinRT** package to consume WinRT APIs.
This sample demonstrates how to use the **Microsoft.ReactNative.WinRT** package to consume projected WinRT APIs with Javascript in a React Native for Windows app.
4
+
5
+
The WinRT APIs demonstrated in this sample include:
6
+
-`Windows.UI.StartScreen`
7
+
-`Windows.Foundation.Uri`
8
+
-`Windows.Storage`
9
+
-`Windows.Foundation.Diagnostics`
10
+
11
+
## Prerequisites
12
+
13
+
- Visual Studio 2019 or later
14
+
- See [System Requirements](https://microsoft.github.io/react-native-windows/docs/rnw-dependencies) for React Native for Windows development
15
+
16
+
## Building and running the sample
17
+
18
+
1. Clone or download the react-native-winrt repository.
19
+
2. Open a developer command prompt pointing at this directory.
20
+
3. Run `npm install` from this directory.
21
+
4. Open the solution file [`\windows\RNWinRTTestApp.sln`](./windows/RNWinRTTestApp.sln) in Visual Studio.
22
+
5. Build the solution.
23
+
6. If running Debug: run `yarn start` in the command prompt from this directory.
24
+
7. F5 deploy the sample app (*RNWinRTTestApp*).
25
+
26
+
You will see something similar to below after successfully building and running the sample:
0 commit comments