Skip to content

Commit 1ff7d0c

Browse files
authored
fix: use the corresponding react-native init version (#581)
closes #580 ### Summary Uses the corresponding version of react-native init as specified by the "--version" flag. This allows the module to be used on RNW versions other than "latest" since latest isn't always compatible with every version and a new version may introduce breaking changes. <!-- What existing problem does the pull request solve? Can you solve the issue with a different approach? --> ### Test plan Actually wasn't able to test this module locally, the instructions failed for me :( but tested `npx --yes [email protected] init testcli --directory examples --version 0.75.0-rc.2 --skip-install --npm` to make sure it works as intended. <!-- List the steps with which we can test this change. Provide screenshots if this changes anything visual. -->
1 parent 8bc47ad commit 1ff7d0c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

packages/create-react-native-library/src/utils/generateExampleApp.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ export default async function generateExampleApp({
6363
type === 'native'
6464
? // `npx react-native init <projectName> --directory example --skip-install`
6565
[
66-
'react-native@latest',
66+
`react-native@${reactNativeVersion}`,
6767
'init',
6868
`${projectName}Example`,
6969
'--directory',

0 commit comments

Comments
 (0)