As of March 2025, the recommended method for creating a React Native application is to use the Expo framework. Expo provides a comprehensive set of tools and services that simplify the development process, allowing you to build, deploy, and iterate on iOS, Android, and web apps from a single JavaScript/TypeScript codebase[1].
Getting Started with Expo:
-
Install Node.js: Ensure you have Node.js installed on your system. You can download it from the official Node.js website.
-
Create a New Expo Project: Open your terminal and run the following command to create a new Expo project:
npx create-expo-app MyNewApp
Replace MyNewApp with your desired project name. This command initializes a new React Native project with Expo.
-
Navigate to Your Project Directory: Change into your project's directory:
cd MyNewApp
-
Start the Development Server: Launch the development server by running:
npx expo start
This command starts the Metro bundler and provides a QR code.
-
Run Your App:
-
On a Physical Device: Install the Expo Go app from the App Store or Google Play Store. Open Expo Go and scan the QR code displayed in your terminal to run your app on your device.
-
On an Emulator/Simulator: If you have an Android emulator or iOS simulator set up, you can press a to open the app on the Android emulator or i for the iOS simulator.
Advantages of Using Expo:
-
Simplified Setup: Expo abstracts many complexities, allowing you to start development without configuring native code.
-
Cross-Platform Development: Write your code once and deploy it across iOS, Android, and web platforms.
-
Access to Native APIs: Expo provides access to a wide range of native APIs without the need to write native code.
-
Over-the-Air Updates: Easily push updates to your app without going through the app store approval process.
For more advanced use cases, such as integrating custom native modules, you can "eject" from the managed workflow to a bare workflow, giving you full control over the native code[1].
By following these steps, you can efficiently set up and develop a React Native application using the latest recommended practices as of 2025.