See ../README.md for details of this sample.
See ../csharp/ for a C# version of this sample.
It currently targets React Native Windows 0.78.
See ../README.md#Setup.
See ../README.md#Run.
To upgrade this sample to the latest version of RNW:
-
Open a command prompt and navigate to the
samples/Calculatorfolder:cd .. -
Delete this folder:
rd /s /q cppwinrt -
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
-
Add a lockfile to the calculator directory:
cd Calculator yarn install -
Add Windows support:
yarn add react-native-windows@latest npx @react-native-community/cli@latest init-windows --template old/uwp-cpp-app --overwrite
-
Rename the folder to cppwinrt
cd .. ren Calculator cppwinrt -
Restore these original app files:
cd cppwinrt git restore README.md git restore App.tsx -
Verify the new app builds and runs:
npx @react-native-community/cli@latest run-windows -
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.
-
Update this readme with the new major version at the top.