A react native starter (with NX) cli script
npm install nx-react-native-cli

A comprehensive React Native mobile application starter kit built with Nx workspace. This package provides a carefully curated set of tools and libraries to streamline your mobile app development process with React Native 0.83.1 and the New Architecture.
Create a new Nx workspace with React Native:
Interactive mode (omit parameters to get prompts):
``bash`
npx nx-react-native-cli@latest create
OR
`bash`
npx nx-react-native-cli@latest create [workspace_name] [bundle_id]
Options:
- --fresh - Create without copying template files--nx-version
- - Specify Nx version (default: 21.2.2)--package-manager
- - Package manager to use: yarn or npm (default: yarn)--skip-install
- - Skip package install--skip-configs
- - Skip prettier, eslint, and husky configs
Examples:
`bash`
npx nx-react-native-cli@latest create MyApp com.company.myapp
npx nx-react-native-cli@latest create MyApp com.company.myapp --skip-configs
npx nx-react-native-cli@latest create MyApp com.company.myapp --package-manager npm
Add React Native to an existing Nx workspace:
Interactive mode (omit parameters to get prompts):
`bash`
cd my-existing-workspace
npx nx-react-native-cli@latest add
OR
`bash`
npx nx-react-native-cli@latest add [app_name] [bundle_id]
Options:
- --fresh - Add without copying template files--package-manager
- - Package manager to use: yarn or npm (default: yarn)--skip-install
- - Skip package install--skip-configs
- - Skip prettier, eslint, and husky configs
Note: Automatically detects NX version from workspace package.json
Examples:
`bash`
cd my-existing-workspace
npx nx-react-native-cli@latest add MyApp com.company.myapp
npx nx-react-native-cli@latest add MyApp com.company.myapp --skip-configs
npx nx-react-native-cli@latest add MyApp com.company.myapp --package-manager npm
To get started with development, follow these simple commands:
`bashStart the Metro bundler
yarn serve:mobile
These commands will help you:
-
serve:mobile: Start the Metro bundler which compiles your JavaScript code
- android: Build and install the app on an Android device or emulator
- xcode`: Open the iOS project in Xcode where you can build and run on iOS simulators or physical devicesMIT
This project uses various open-source libraries and tools. We're grateful to the maintainers and contributors of these projects.