diff --git a/packages/react-native/cli.js b/packages/react-native/cli.js index 7dd4bfb76de8d5..0e1bd5216512d0 100755 --- a/packages/react-native/cli.js +++ b/packages/react-native/cli.js @@ -39,6 +39,16 @@ async function getLatestVersion(registryHost = DEFAULT_REGISTRY_HOST) { }); } +/** + * Warn when users are using `npx react-native init`, to raise awareness of the changes from RFC 0759. + * @see https://github.com/react-native-community/discussions-and-proposals/tree/main/proposals/0759-react-native-frameworks.md + */ +function warnWhenRunningInit() { + if (process.argv[2] === 'init') { + console.warn('\nRunning: npx @react-native-community/cli init\n'); + } +} + /** * npx react-native -> @react-native-community/cli * @@ -66,6 +76,9 @@ async function main() { // Ignore errors, since it's a nice to have warning } } + + warnWhenRunningInit(); + return cli.run(name); }