Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
1 change: 0 additions & 1 deletion .github/copilot-instructions.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ This repository contains React Native samples, components, and templates for Win
│ ├── Calculator/ # Calculator sample with C++/WinRT, C#, and Fabric implementations
│ ├── NativeModuleSample/ # Native module and component examples
│ └── ContinuousIntegration/ # CI/CD pipeline configurations
├── samples-old/ # Legacy samples for older RN versions
├── website/ # Documentation website (Docusaurus)
├── docs/ # Additional documentation
└── .github/ # GitHub workflows and templates
Expand Down
55 changes: 25 additions & 30 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -1,43 +1,38 @@
version: 2
updates:
- package-ecosystem: npm
directory: "/samples/"
schedule:
interval: daily
time: "05:00"
timezone: "America/Los_Angeles"
labels:
- dependencies
versioning-strategy: auto
commit-message:
prefix: 📦
open-pull-requests-limit: 10

- package-ecosystem: nuget
directory: "/samples/"
# Every folder with a package.json: the samples, website, and websitev2.
directories:
- "**/*"
target-branch: "main"
cooldown:
default-days: 8
ignore:
# Samples move to new React Native for Windows versions through the CI Upgrade workflow.
- dependency-name: "react-native-windows"
- dependency-name: "*"
update-types:
- "version-update:semver-major"
groups:
all-dependencies:
applies-to: version-updates
patterns:
- '*'
security-updates:
applies-to: security-updates
patterns:
- '*'
schedule:
interval: daily
interval: weekly
time: "05:00"
timezone: "America/Los_Angeles"
labels:
- dependencies
versioning-strategy: auto
- dependencies
versioning-strategy: lockfile-only
commit-message:
prefix: 📦
open-pull-requests-limit: 10
open-pull-requests-limit: 5

- package-ecosystem: npm
directory: "/website/"
schedule:
interval: daily
time: "05:00"
timezone: "America/Los_Angeles"
labels:
- dependencies
versioning-strategy: auto
commit-message:
prefix: 📦
open-pull-requests-limit: 10
- package-ecosystem: "github-actions"
directory: "/"
groups:
Expand Down
3 changes: 1 addition & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -14,5 +14,4 @@ website/i18n/*

# This is not a mono repo, ignore files from people accidentally running yarn in the wrong places
/yarn.lock
/samples/yarn.lock
/samples-old/yarn.lock
/samples/yarn.lock
2 changes: 1 addition & 1 deletion docs/native-modules-advanced.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ title: Native Modules (Advanced)

>**This documentation and the underlying platform code is a work in progress.**
>**Examples (C# and C++/WinRT):**
> - [Native Module Sample in `microsoft/react-native-windows-samples`](https://github.com/microsoft/react-native-windows-samples/tree/main/samples-old/NativeModuleSample)
> - [Native Module Sample in `microsoft/react-native-windows-samples`](https://github.com/microsoft/react-native-windows-samples/tree/a87d8404c42e189d1553c31e9e62cd3172d16c03/samples-old/NativeModuleSample)

## Writing Native Modules without using Attributes (C#)

Expand Down
6 changes: 3 additions & 3 deletions docs/native-modules-async.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ A common scenario for [Native Modules](native-modules.md) is to call one or more

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

> 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).
> 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/a87d8404c42e189d1553c31e9e62cd3172d16c03/samples-old/NativeModuleSample).

## Writing Native Modules that call Asynchronous Windows APIs

Expand Down Expand Up @@ -121,7 +121,7 @@ as well as store the status code and update the return statement from `return co

But wait, we've only discussed the success path, what happens if `GetHttpResponse` doesn't succeed? We don'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.

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).
That's it! If you want to see the complete `SimpleHttpModule`, see [`AsyncMethodExamples.cs`](https://github.com/microsoft/react-native-windows-samples/blob/a87d8404c42e189d1553c31e9e62cd3172d16c03/samples-old/NativeModuleSample/csharp/windows/NativeModuleSample/AsyncMethodExamples.cs).

### `SimpleHttpModule` in C++/WinRT

Expand Down Expand Up @@ -262,7 +262,7 @@ We've defined an `AsyncActionCompletedHandler` lambda and set it to be run when

> **Important:** This example shows the minimum case, where you don't handle any errors within `GetHttpResponseAsync`, but you're not limited to this. 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.

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).
That's it! If you want to see the complete `SimpleHttpModule`, see [`AsyncMethodExamples.h`](https://github.com/microsoft/react-native-windows-samples/blob/a87d8404c42e189d1553c31e9e62cd3172d16c03/samples-old/NativeModuleSample/cppwinrt/windows/NativeModuleSample/AsyncMethodExamples.h).

## Executing calls to API on the UI thread

Expand Down
2 changes: 1 addition & 1 deletion docs/native-modules-marshalling-data.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ The end-to-end data flow looks something like this:

## Examples

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.
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/a87d8404c42e189d1553c31e9e62cd3172d16c03/samples-old/NativeModuleSample). Implementations for both C# and C++/WinRT are provided.

For further examples of using the dynamic `JSValue` type, see [Using `JSValue`](native-modules-jsvalue.md).

Expand Down
2 changes: 1 addition & 1 deletion docs/native-modules.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ title: Native Modules
> **This documentation and the underlying platform code is a work in progress.**
> **Examples (C# and C++/WinRT):**
>
> - [Native Module Sample in `microsoft/react-native-windows-samples`](https://github.com/microsoft/react-native-windows-samples/tree/main/samples-old/NativeModuleSample)
> - [Native Module Sample in `microsoft/react-native-windows-samples`](https://github.com/microsoft/react-native-windows-samples/tree/a87d8404c42e189d1553c31e9e62cd3172d16c03/samples-old/NativeModuleSample)

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.

Expand Down
6 changes: 0 additions & 6 deletions samples-old/AppServiceDemo/.buckconfig

This file was deleted.

3 changes: 0 additions & 3 deletions samples-old/AppServiceDemo/.editorconfig

This file was deleted.

4 changes: 0 additions & 4 deletions samples-old/AppServiceDemo/.eslintrc.js

This file was deleted.

63 changes: 0 additions & 63 deletions samples-old/AppServiceDemo/.flowconfig

This file was deleted.

3 changes: 0 additions & 3 deletions samples-old/AppServiceDemo/.gitattributes

This file was deleted.

59 changes: 0 additions & 59 deletions samples-old/AppServiceDemo/.gitignore

This file was deleted.

7 changes: 0 additions & 7 deletions samples-old/AppServiceDemo/.prettierrc.js

This file was deleted.

1 change: 0 additions & 1 deletion samples-old/AppServiceDemo/.watchmanconfig

This file was deleted.

Loading
Loading