Skip to content

Commit 3520f2d

Browse files
Doc/README changes with name change (#131)
* revise readme and sample readme * update image
1 parent 67b11eb commit 3520f2d

3 files changed

Lines changed: 36 additions & 11 deletions

File tree

README.md

Lines changed: 8 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,16 @@
1-
# The JS/WinRT language projection
1+
# React Native WinRT
22

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`.
44

5-
## Building JS/WinRT Sample
5+
This repo generates the **Microsoft.ReactNative.WinRT** NuGet package for specific versions of React Native Windows.
66

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
138

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.
1510

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.
1714

1815
## Contributing
1916

samples/RNWinRTTestApp/README.md

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
# React Native WinRT Sample
2+
3+
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:
27+
28+
<img src="images/sample-app.png" alt="Sample app" width="400">
323 KB
Loading

0 commit comments

Comments
 (0)