Note: Make sure you have completed the React Native - Environment Setup instructions till "Creating a new application" step, before proceeding.
- Android Phone Started. Required for steps below.
- Metro Server Bundler
triggers build system to pull packages.
npm run dev --> npx react-native
- Run the app installer.
initializes install of the app to the android emulator ( can take a while ).
- For Android --> npx android - For IOS --> npx ios
If everything is set up correctly, you should see your new app running in your Android Emulator or iOS Simulator shortly provided you have set up your emulator/simulator correctly.
This is one way to run your app — you can also run it directly from within Android Studio and Xcode respectively.
-
Open
src/Main.mjs
. -
For Android: Press the R key twice or select "Reload" from the Developer Menu (Ctrl + M (on Window and Linux) or Cmd ⌘ + M (on macOS)) for "Element Inspecting".
For iOS: Hit Cmd ⌘ + R in your iOS Simulator to reload the app and see your changes!
To learn more about React Native, take a look at the following resources:
- React Native Website - learn more about React Native.
- Getting Started - an overview of React Native and how setup your environment.
- Learn the Basics - a guided tour of the React Native basics.
- Blog - read the latest official React Native Blog posts.
@facebook/react-native
- the Open Source; GitHub repository for React Native.