DEV Community

Laxman Nemane
Laxman Nemane

Posted on

πŸš€ Setting Up Your First React Native CLI Project

Starting with React Native CLI? Follow this step-by-step guide to set up your first React Native project successfully! πŸ“±πŸ’»

πŸ—’οΈβš οΈ Please ensure all prerequisites are installed as mentioned in my last post. Check Prerequisites Here

1️⃣ . Install react native project πŸ“¦
πŸ”ΉRun

npx @react-native-community/cli init newproject --version X.XX.X
Enter fullscreen mode Exit fullscreen mode

πŸ‘‰ Learn more in the init docs
This command will create a new project for you. No additional setup is requiredβ€”just run the project! πŸš€

πŸš€ Run the Project
1️⃣ Navigate to the project directory:

cd newproject
Enter fullscreen mode Exit fullscreen mode

2️⃣ Start the Metro Bundler:

npm start
Enter fullscreen mode Exit fullscreen mode

After running this command, you'll see some options:

  • i β†’ Run on iOS πŸ“±
  • a β†’ Run on Android πŸ€–
  • r β†’ Reload the app πŸ”„
  • d β†’ Open the Developer Menu βš™οΈ
  • j β†’ Open DevTools πŸ› οΈ

Simply press the corresponding key to execute the desired action! πŸš€

Congratulations! πŸŽ‰ You’ve successfully set up and run your first React Native CLI project. Now, you’re ready to start building your app!

βœ… Stay tuned! In the next post, I’ll explain the React Native project folder structure in detail. πŸ“‚πŸ‘¨β€πŸ’»

Let’s keep learning and growing together!

Top comments (0)