Skip to content

Commit 8cf1146

Browse files
Fix broken init command in documentation (#1013)
## Description ### Why This PR fixes a insonsitency in the documentation and updates the init command to the latest date because the current command is resulting in the following error ``` npx react-native@latest init ReactNativeGithub --version 0.76.0 🚨️ The `init` command is deprecated. - Switch to npx @react-native-community/cli init for the identical behavior. - Refer to the documentation for information about alternative tools: https://reactnative.dev/docs/getting-started Exiting... ``` Furthermore, I've removed the path level from the version value so the latest patch will be used (0.76.7) What is the motivation for this change? Add a few sentences describing the context and overall goals of the pull request's commits. ###### Microsoft Reviewers: [Open in CodeFlow](https://microsoft.github.io/open-pr/?codeflow=https://github.com/microsoft/react-native-windows-samples/pull/1013) --------- Co-authored-by: Saad Najmi <sanajmi@microsoft.com>
1 parent 4fdfde2 commit 8cf1146

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

docs/rnm-getting-started.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,10 +13,10 @@ For information around how to set up:
1313

1414
## Install React Native for macOS
1515

16-
Remember to call `react-native init` from the place you want your project directory to live. Be sure to use the same minor version between React Native and React Native macOS. We'll use `^0.71.0`
16+
Remember to call `@react-native-community/cli init` from the place you want your project directory to live. Be sure to use the same minor version between React Native and React Native macOS. We'll use `^0.76.0`
1717

1818
```
19-
npx react-native@latest init <projectName> --version 0.76.0
19+
npx @react-native-community/cli init <projectName> --version 0.76
2020
```
2121

2222
### Navigate into this newly created directory

0 commit comments

Comments
 (0)