Skip to content

Commit 9f52f25

Browse files
authored
Merge pull request #3663 from MicrosoftDocs/drewbat/github-issue-3906
Update react-native-for-windows.md
2 parents a7a304d + 6fd8d8a commit 9f52f25

File tree

2 files changed

+12
-2
lines changed

2 files changed

+12
-2
lines changed

hub/dev-environment/javascript/react-native-for-android.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,11 @@ React Native is an [open-source](https://github.com/facebook/react-native) mobil
4343
```powershell
4444
npx react-native init MyReactNativeApp
4545
```
46+
If you want to start a new project with a specific React Native version, you can use the `--version` argument. For information about versions of React Native, see [Versions - React Native](https://reactnative.dev/versions).
47+
48+
```powershell
49+
npx [email protected] init <projectName> --version X.XX.X
50+
```
4651
4752
2. Open your new "MyReactNativeApp" directory:
4853

hub/dev-environment/javascript/react-native-for-windows.md

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,15 +33,20 @@ You can create a Windows desktop app using React Native for Windows by following
3333
```powershell
3434
npx react-native init <projectName>
3535
```
36+
If you want to start a new project with a specific React Native version, you can use the `--version` argument. For information about versions of React Native, see [Versions - React Native](https://reactnative.dev/versions).
37+
38+
```powershell
39+
npx [email protected] init <projectName> --version X.XX.X
40+
```
3641
37-
3. Switch to the project directory and run the following command to install the React Native for Windows packages:
42+
4. Switch to the project directory and run the following command to install the React Native for Windows packages:
3843
3944
```powershell
4045
cd projectName
4146
npx react-native-windows-init --overwrite
4247
```
4348
44-
4. To run the app, first launch your web browser (ie. Microsoft Edge), then execute the following command:
49+
5. To run the app, first launch your web browser (ie. Microsoft Edge), then execute the following command:
4550
4651
```powershell
4752
npx react-native run-windows

0 commit comments

Comments
 (0)