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: docs/native-modules-advanced.md
+1-1Lines changed: 1 addition & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -9,7 +9,7 @@ title: Native Modules (Advanced)
9
9
10
10
>**This documentation and the underlying platform code is a work in progress.**
11
11
>**Examples (C# and C++/WinRT):**
12
-
> -[Native Module Sample in `microsoft/react-native-windows-samples`](https://github.com/microsoft/react-native-windows-samples/tree/main/samples/NativeModuleSample)
12
+
> -[Native Module Sample in `microsoft/react-native-windows-samples`](https://github.com/microsoft/react-native-windows-samples/tree/main/samples-old/NativeModuleSample)
13
13
> -[Sample App in `microsoft/react-native-windows/packages/microsoft-reactnative-sampleapps`](https://github.com/microsoft/react-native-windows/tree/main/packages/sample-apps)
14
14
15
15
## Writing Native Modules without using Attributes (C#)
Copy file name to clipboardExpand all lines: docs/native-modules-async.md
+3-3Lines changed: 3 additions & 3 deletions
Original file line number
Diff line number
Diff line change
@@ -13,7 +13,7 @@ A common scenario for [Native Modules](native-modules.md) is to call one or more
13
13
14
14
This document proposes some best patterns to follow when bridging asynchronous methods from JS to native code for React Native Windows. It assumes you've already familiar with the basics of setting up and writing [Native Modules](native-modules.md).
15
15
16
-
> The complete source for the examples below are provided within the [Native Module Sample in `microsoft/react-native-windows-samples`](https://github.com/microsoft/react-native-windows-samples/tree/main/samples/NativeModuleSample).
16
+
> The complete source for the examples below are provided within the [Native Module Sample in `microsoft/react-native-windows-samples`](https://github.com/microsoft/react-native-windows-samples/tree/main/samples-old/NativeModuleSample).
17
17
18
18
## Writing Native Modules that call Asynchronous Windows APIs
19
19
@@ -119,7 +119,7 @@ as well as store the status code and update the return statement from `return co
119
119
120
120
Butwait, we've only discussed the success path, what happens if `GetHttpResponse` doesn'tsucceed?Wedon't handle any exceptions in this example. If an exception is thrown, how do we marshal an error back to JavaScript? That is actually taken care of for you by the framework: any exception in the task will be marshaled to the JavaScript side as a JavaScript exception.
121
121
122
-
That's it! If you want to see the complete `SimpleHttpModule`, see [`AsyncMethodExamples.cs`](https://github.com/microsoft/react-native-windows-samples/blob/main/samples/NativeModuleSample/csharp/windows/NativeModuleSample/AsyncMethodExamples.cs).
122
+
That's it! If you want to see the complete `SimpleHttpModule`, see [`AsyncMethodExamples.cs`](https://github.com/microsoft/react-native-windows-samples/blob/main/samples-old/NativeModuleSample/csharp/windows/NativeModuleSample/AsyncMethodExamples.cs).
123
123
124
124
### `SimpleHttpModule` in C++/WinRT
125
125
@@ -260,7 +260,7 @@ We've defined an `AsyncActionCompletedHandler` lambda and set it to be run when
260
260
261
261
>**Important:**Thisexampleshowstheminimumcase, whereyoudon't handle any errors within `GetHttpResponseAsync`, but you'renotlimitedtothis. You're free to detect error conditions within your code and call `capturedPromise.Reject()` yourself with (more useful) error messages at any time. However you should *always* include this final handler, to catch any unexpected and unhandled exceptions that may occur, especially when calling Windows APIs. Just be sure that you only call `Reject()` once and that nothing executes afterwards.
262
262
263
-
That's it! If you want to see the complete `SimpleHttpModule`, see [`AsyncMethodExamples.h`](https://github.com/microsoft/react-native-windows-samples/blob/main/samples/NativeModuleSample/cppwinrt/windows/NativeModuleSample/AsyncMethodExamples.h).
263
+
That's it! If you want to see the complete `SimpleHttpModule`, see [`AsyncMethodExamples.h`](https://github.com/microsoft/react-native-windows-samples/blob/main/samples-old/NativeModuleSample/cppwinrt/windows/NativeModuleSample/AsyncMethodExamples.h).
Copy file name to clipboardExpand all lines: docs/native-modules-marshalling-data.md
+1-1Lines changed: 1 addition & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -41,7 +41,7 @@ The end-to-end data flow looks something like this:
41
41
42
42
## Examples
43
43
44
-
For examples of using data automatically marshaled into both static and dynamic native types, see the `DataMarshalingExamples` module within the [Native Module Sample in `microsoft/react-native-windows-samples`](https://github.com/microsoft/react-native-windows-samples/tree/main/samples/NativeModuleSample). Implementations for both C# and C++/WinRT are provided.
44
+
For examples of using data automatically marshaled into both static and dynamic native types, see the `DataMarshalingExamples` module within the [Native Module Sample in `microsoft/react-native-windows-samples`](https://github.com/microsoft/react-native-windows-samples/tree/main/samples-old/NativeModuleSample). Implementations for both C# and C++/WinRT are provided.
45
45
46
46
For further examples of using the dynamic `JSValue` type, see [Using `JSValue`](native-modules-jsvalue.md).
Copy file name to clipboardExpand all lines: docs/native-modules.md
+1-1Lines changed: 1 addition & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -10,7 +10,7 @@ title: Native Modules
10
10
> **This documentation and the underlying platform code is a work in progress.**
11
11
> **Examples (C# and C++/WinRT):**
12
12
>
13
-
> -[Native Module Sample in `microsoft/react-native-windows-samples`](https://github.com/microsoft/react-native-windows-samples/tree/main/samples/NativeModuleSample)
13
+
> -[Native Module Sample in `microsoft/react-native-windows-samples`](https://github.com/microsoft/react-native-windows-samples/tree/main/samples-old/NativeModuleSample)
14
14
> -[Sample App in `microsoft/react-native-windows/packages/microsoft-reactnative-sampleapps`](https://github.com/microsoft/react-native-windows/tree/main/packages/sample-apps)
15
15
16
16
Sometimes an app needs access to a platform API that React Native doesn't have a corresponding module for yet. Maybe you want to reuse some existing .NET code without having to re-implement it in JavaScript, or write some high performance, multi-threaded code for image processing, a database, or any number of advanced extensions.
0 commit comments