1. Install Node.js and Watchman
Make sure you have the latest version of Node.js installed.
brew install node
brew install watchman
2. Install React Native CLI globally
npm install -g react-native-cli
Or use npx
without global install (recommended to avoid version conflicts):
You don't need to install it globally; you can directly run with:
npx react-native init MyNewProject
This will scaffold the new project.
3. Create a new React Native project
npx react-native init MyNewProject
You can specify a template like this if needed:
npx react-native init MyNewProject --template react-native-template-typescript
4. Navigate into the project directory
cd MyNewProject
5. Install dependencies (if needed)
npm install
or
yarn
✅ 6. Run on Android
Make sure you have Android Studio installed with SDK setup and emulator running.
npx react-native run-android
7. Run on iOS (Mac only)
Make sure Xcode is installed.
npx react-native run-ios
This will start the simulator.
8. Linking Native Modules (If Needed)
For libraries that require native code changes:
npx react-native link
Though many libraries now use auto-linking and don't need this step.
9. Debugging and Development
- Use
react-native start
to start the Metro bundler manually if it's not auto-running.
npx react-native start
- You can reload, debug, or use React DevTools.
10. Build APK / IPA (Optional for release)
For Android:
cd android
./gradlew assembleRelease
For iOS:
Open ios/MyNewProject.xcworkspace
in Xcode → Archive → Export.
Notes:
- Use
npx
for the latest React Native without globally installing. - For full native capabilities, CLI is preferable over Expo.
- Keep SDKs updated regularly.
- On Windows, iOS build isn't supported unless using cloud services.
Top comments (0)