Expo↗ simplifies React Native app development by handling much of the configuration needed for Android and iOS. You can use Expo for free, and it makes building and distributing apps easier. Install Expo Go to preview your app on a physical device as you work.
Expo simplifies building and deploying an app. In the Expo Go workflow, some libraries aren't available and you can't add custom native features. React Native CLI gives you direct access to the native project when you need functionality outside that workflow.
Check whether the features you need are compatible with Expo. If they aren't, consider React Native CLI.
Node.js is the JavaScript runtime required for React Native development. You can download the LTS version from the Node.js website or install it on a Mac with Homebrew and nvm. Follow the guide below to set it up.
Install Node.js on macOS with Homebrew, nvm, and npm
Then run node -v and npm -v in a terminal to check the versions.
Sign up on the Expo website and sign in.
Official Expo website↗
Click Create a new project and enter a name to create your project.
Creating an Expo project named Test
2.2. Install Expo CLI and Create a Local Project 🔗
You can optionally install expo-cli globally from the terminal. You can also create and run the project with npx expo commands without installing expo-cli globally.
npm install --global expo-cli
If you installed expo-cli, use expo init to create the project.
npx create-expo-app@latest
Enter y to install any additional packages, then set the project name and let the setup finish.
Setup is complete when you see ‘Your project is ready!’
Sign in to Expo before running the project.
npx expo login # expo 계정 입력
Once the local project is ready, enter its directory and link it to your Expo project. Find the project ID on the Expo project details page.
cd my-new-projecteas init --id {expo 프로젝트 id}
Once it is linked, start the project.
npm start
Press a to open the app in the Android Studio emulator, w to open it in a browser, or i to open it in the Xcode iOS Simulator, which is available on macOS.
Install Expo Go on your phone.
Download Expo Go for Android↗Download Expo Go for iOS↗
Scan the QR code to preview the app on the device as you develop. You can also sign in to Expo Go and open the link to your development app.
Choose Expo or React Native CLI based on your project. Expo simplifies app development, while Expo Go has limits on which libraries and native features are available. For features outside that workflow, consider React Native CLI or the Expo native project workflow below.
Expo previously used expo eject to convert an Expo project to a React Native CLI project. The command was deprecated and replaced by prebuild↗.
Expo FAQ: Is expo eject deprecated?↗