Hacktoberfest 2026:维护者为十月标记出来的 issue,仍然开放、适合新手。 浏览 Hacktoberfest issue

Update Sample Apps package.json to 0.79.2

未关闭
#1,054 0 条评论 1 个 reaction 已指派 2 人 在 GitHub 查看

@anupriya13 已经在做这个了。

开始于 2025年7月24日。

  • #1055 来自 @copilot-swe-agent —— 已关闭,未合并
  • #1056 来自 @copilot-swe-agent —— 已关闭,未合并

评估

这个 Issue 还没有评估数据。

描述

enhancement

Refer this PR and update all package.json for sample apps to 0.79.2 for react-native-windows https://github.com/microsoft/react-native-windows-samples/pull/1041/files#diff-636eeb99b0e95581cba2bea9bd8e2a3b66afd0156aed21581d334d52597ef4df

This diff should be similar to above PR.
Below instructions can help you complete this task:

Calculator C++/WinRT Sample - React Native for Windows

See ../README.md for details of this sample.

See ../csharp/ for a C# version of this sample.

It currently targets React Native Windows 0.79.

Setup

See ../README.md#Setup.

Run

See ../README.md#Run.

Upgrade

To upgrade this sample to the latest version of RNW:

  1. Open a command prompt and navigate to the samples/Calculator folder:

    cd ..
    
  2. Delete this folder:

    rd /s /q cppwinrt
    
  3. Create a new React Native app and change version to version you want to upgrade to (replace 'version' with desired version - for latest version, use 'latest'):

    npx @react-native-community/cli@latest init Calculator --template @react-native-community/template@latest --skip-git-init
    
  4. Add a lockfile to the calculator directory:

    cd Calculator
    yarn install
    
  5. Add Windows support:

    yarn add react-native-windows@latest
    npx @react-native-community/cli@latest init-windows --template old/uwp-cpp-app --overwrite
    
  6. Rename the folder to cppwinrt

    cd ..
    ren Calculator cppwinrt
    
  7. Restore these original app files:

    cd cppwinrt
    git restore README.md
    git restore App.tsx
    
  8. Verify the new app builds and runs:

    npx @react-native-community/cli@latest run-windows
    
  9. Look at the Package.appxmanifast and change the publisher name to "CN=React Native Windows Sample". Revert all changes made to GUID values in the project and solution files.

  10. Update this readme with the new major version at the top.

Calculator C# Sample - React Native for Windows

See ../README.md for details of this sample.

See ../cppwinrt/ for a C++/Winrt version of this sample.

It currently targets React Native Windows 0.79.

Setup

See ../README.md#Setup.

Run

See ../README.md#Run.

Upgrade

To upgrade this sample to the latest version of RNW:

  1. Open a command prompt and navigate to the samples/Calculator folder:

    cd ..
    
  2. Delete this folder:

    rd /s /q csharp
    
  3. Create a new React Native app and change version to version you want to upgrade to (replace 'version' with desired version - for latest version, use 'latest'):

    npx @react-native-community/cli@latest init Calculator --template @react-native-community/template@latest --skip-git-init
    
  4. Add yarn.lock file to app directory (otherwise yarn add react-native-windows@latest will throw an error)

  5. Add Windows support:

    cd Calculator
    yarn add react-native-windows@latest
    npx @react-native-community/cli@latest init-windows --template old/uwp-cs-app --overwrite
    
  6. Rename the folder to csharp

    cd ..
    ren Calculator csharp
    
  7. Restore these original app files:

    cd csharp
    git restore README.md
    git restore App.tsx
    
  8. Verify the new app builds and runs:

    npx @react-native-community/cli@latest run-windows
    
  9. Look at the Package.appxmanifast and change the publisher name to "CN=React Native Windows Sample". Revert all changes made to GUID values in the project and solution files.

  10. Update this readme with the new major version at the top.

CalculatorExperimental - React Native for Windows

This sample showcases the usage of React Native for Windows to build a simple calculator that is hosted on the experimental Fabric rendering system.

Currently this samples targets RNW 0.79

Setup

First, make sure you've met the React Native Windows System Requirements.

Then, within this folder, install the applications's dependencies. If you have yarn installed:

yarn install

Otherwise, you can just use npm:

npm install
Run

Once you have all of the dependencies installed, you can run the application with the following command:

npx @react-native-community/cli@latest run-windows

The command will:

  • Build the application and all dependencies
  • Deploy the application
  • Launch the React Native Server and Debugger
  • Launch the application
Upgrade

To upgrade this sample to the latest version of RNW:

  1. Open a command prompt and navigate to the samples folder:

    cd ..
    
  2. Delete this folder:

    rd /s /q fabric
    
  3. Create a new React Native app and change version to version you want to upgrade to:

        npx --yes @react-native-community/cli@latest init CalculatorFabric --template @react-native-community/template@latest --skip-git-init
    
  4. Add Windows support:

    cd CalculatorFabric
    yarn add react-native-windows@latest
    npx @react-native-community/cli init-windows --template cpp-app --overwrite --logging
    
  5. Rename the folder to fabric

    cd ..
    ren CalculatorFabric fabric
    
  6. Restore README.md and App.tsx

    cd fabric
    git restore App.tsx
    git restore README.md
    
  7. Verify App runs

    npx @react-native-community/cli@latest run-windows
    
  8. Look at the Package.appxmanifast and change the publisher name to "CN=React Native Windows Sample". Revert all changes made to GUID values in the project and solution files.

  9. Update this file to the current version of the App

Native Module C++ Sample - React Native for Windows

See ../README.md for more details of this sample.

Note: Don't build your own projects directly out of this sample. When you publish a native module (as source), you'll want to create a new project with the correct metadata. This will also make sure that you're using unique identifiers in your project files to avoid conflicts with other native modules.

Setup

First, make sure you've met the React Native Windows System Requirements.

Then, install the module's dependencies with yarn and build the TypeScript:

yarn install
yarn prepare
Run

To run the example app (targeting the New Architecture) and see that the module works:

yarn example windows

Alternatively, to run the old example app (targeting the Old Architecture) and see that the module works:

yarn example-old windows
Upgrade

First run the Setup steps above. Then run the UpgradeSmokeTest.ps1 script with the target RNW version (usually latest):

..\..\..\.github\scripts\UpgradeSmokeTest.ps1 latest $True $True $True

Then call the following to update the JS and codegen with:

yarn prepare
yarn codegen-windows

Finally, build and verify both example apps as per the Run steps above. If both apps work without issue, then go ahead and submit the PR with your changes.

主要语言
C#
星标
544
派生
218
PR 合并指标
30 天内没有已合并 PR

环境准备

  • 提供 Dockerfile 或 Docker Compose 文件
  • 有 Pull Request 模板
  • 没有贡献指南

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

microsoft/react-native-windows-samples 的其他 Issue

查看 microsoft/react-native-windows-samples 的全部 Issue

相似的 Issue

更多 C# Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。