- #MAC EMULATOR REACT NATIVE PROJECT HOW TO#
- #MAC EMULATOR REACT NATIVE PROJECT ANDROID#
- #MAC EMULATOR REACT NATIVE PROJECT CODE#
The instructions are a bit different depending on your development operating system, and whether you want to start developing for iOS or Android. For example, if you are integrating React Native into an existing application, or if you "ejected" from Create React Native App, you'll need this section.
#MAC EMULATOR REACT NATIVE PROJECT CODE#
Select "Building Projects with Native Code" above for instructions on configuring a native build environment for React Native.įollow these instructions if you need to build native code in your project. If you're integrating React Native into an existing project, you'll want to skip Create React Native App and go directly to setting up the native build environment. You can check this document to find out what versions are supported. The Expo client app usually gains support for a given React Native version about a week after the React Native version is released as stable.
![mac emulator react native project mac emulator react native project](https://i.imgur.com/Yd4wQ10.png)
If you do eject, the "Building Projects with Native Code" instructions will be required to continue working on your project.Ĭreate React Native App configures your project to use the most recent React Native version that is supported by the Expo client app. In that case you'll just need to " eject" eventually to create your own native builds. If you know that you'll eventually need to include your own native code, Create React Native App is still a good way to get started. Caveatsīecause you don't build any native code when using Create React Native App to create a project, it's not possible to include custom native modules beyond the React Native APIs and components that are available in the Expo client app.
#MAC EMULATOR REACT NATIVE PROJECT ANDROID#
Once you've set these up, you can launch your app on an Android Virtual Device by running npm run android, or on the iOS Simulator by running npm run ios (macOS only).
#MAC EMULATOR REACT NATIVE PROJECT HOW TO#
If you want to run your app on the iOS Simulator or an Android Virtual Device, please refer to the instructions for building projects with native code to learn how to install Xcode and set up your Android development environment. Running your app on a simulator or virtual deviceĬreate React Native App makes it really easy to run your React Native app on a physical device without setting up a development environment. If you're curious to learn more about React Native, continue on to the Tutorial. If you can't get this to work, see the Troubleshooting section in the README for Create React Native App. That's it!Ĭongratulations! You've successfully run and modified your first React Native app.Ĭreate React Native App also has a user guide you can reference if you have questions specific to the tool. The application should reload automatically once you save your changes.
![mac emulator react native project mac emulator react native project](https://res.cloudinary.com/practicaldev/image/fetch/s--EDlEnEXb--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://pbs.twimg.com/media/En3mtvkVgAEHvR9.jpg)
Open App.js in your text editor of choice and edit some lines. Now that you have successfully run the app, let's modify it. Using the Expo app, scan the QR code from your terminal to open your project. Install the Expo client app on your iOS or Android phone and connect to the same wireless network as your computer. This will start a development server for you, and print a QR code in your terminal. Then run the following commands to create a new React Native project called "AwesomeProject": create-react-native-app AwesomeProject
![mac emulator react native project mac emulator react native project](https://i.stack.imgur.com/NUyLF.png)
It allows you to start a project without installing or configuring any tools to build native code - no Xcode or Android Studio installation required (see Caveats).Īssuming that you have Node installed, you can use npm to install the create-react-native-app command line utility: npm install -g create-react-native-app Create React Native App is the easiest way to start building a new React Native application.