Skip to content

Commit

Permalink
Upgrade nativemodule samples to 0.76 (#1001)
Browse files Browse the repository at this point in the history
## Description
Upgrades cppwinrt and csharp samples to 0.76. cpp-lib sample is already
on 0.76 and does not need to be upgraded yet.

### Why
Part of the 0.76 release.
###### Microsoft Reviewers: [Open in
CodeFlow](https://microsoft.github.io/open-pr/?codeflow=https://github.com/microsoft/react-native-windows-samples/pull/1001)
  • Loading branch information
Yajur-Grover authored Dec 11, 2024
1 parent 50c3333 commit 19d5561
Show file tree
Hide file tree
Showing 10 changed files with 2,965 additions and 2,752 deletions.
2 changes: 1 addition & 1 deletion samples/NativeModuleSample/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

These samples showcase building Native Modules for React Native for Windows. It includes implementations in [C#](./csharp/) and [C++/WinRT](./cppwinrt/).

Both implementations target React Native Windows 0.75.
Both implementations target React Native Windows 0.76.

The official documentation can be found here:

Expand Down
13 changes: 10 additions & 3 deletions samples/NativeModuleSample/cppwinrt/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1",
"codegen-windows": "react-native codegen-windows",
"windows": "react-native run-windows"
"windows": "npx @react-native-community/cli run-windows"
},
"peerDependencies": {
"react": "^16.13.1",
Expand All @@ -15,8 +15,8 @@
"devDependencies": {
"metro-config": "^0.66.2",
"react": "18.3.1",
"react-native": "0.75.1",
"react-native-windows": "^0.75.0"
"react-native": "0.76.2",
"react-native-windows": "^0.76.2"
},
"codegenConfig": {
"name": "NativeModuleSample",
Expand All @@ -25,5 +25,12 @@
"windows": {
"namespace": "NativeModuleSample"
}
},
"react-native-windows": {
"init-windows": {
"name": "NativeModuleSample",
"namespace": "NativeModuleSample",
"template": "old/uwp-cpp-lib"
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -16,14 +16,6 @@
-->
<UseHermes>true</UseHermes>

<!--
Changes compilation to assume use of WinUI 3 instead of System XAML.
Requires creation of new project.
See https://microsoft.github.io/react-native-windows/docs/winui3
-->
<UseWinUI3>false</UseWinUI3>

<!--
Changes compilation to assume use of Microsoft.ReactNative NuGet packages
instead of building the framework from source.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- This project was created with react-native-windows 0.75.0 -->
<!-- This project was created with react-native-windows 0.76.2 -->
<Project ToolsVersion="Current" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Import Project="$(SolutionDir)\ExperimentalFeatures.props" Condition="Exists('$(SolutionDir)\ExperimentalFeatures.props')" />
<PropertyGroup Label="Globals">
Expand Down
Loading

0 comments on commit 19d5561

Please sign in to comment.