1.1 React Native Getting Started
In this tutorial, you will set up the create-react-native-app for scaffolding a React Native starter application on your computer. Also this will use the Expo framework for React Native app development. At the end of this tutorial, you will be able to:
- Set up the create-react-native-app for scaffolding a React Native starter application on your computer
- Use the Expo framework
1.1.1 How to:
1. Download and install NodeJS (LTS version) from: https://nodejs.org:
-
$ node --version
-
$ npm --version
- [OR] Update NodeJS:
- Windows: uninstall and install the latest version.
- MacOS: use the sudo command.
- Upgrade NPM:
$ npm install npm --global
- Clean NPM cache:
$ npm cache clean --force
- Install N package:
$ npm install n --global
- Install NodeJS stable:
$ n stable
2. Get the command line tool:
$ npm install expo-cli --global
$ expo --version
3. Create your first project:
$ expo init <projectname>
$ cd <projectname>
4. Start the project:
- Lan URL:
- $ expo start --clear
- Tunnel URL:
- $ npm install @expo/ngrok@^4.1.0 --global
- $ expo start --tunnel --clear
5. Preview your project:
- Download the "Expo Go" application from Google Play (Android) or App Store (iOS).
- Scan the QR code with Expo (Android) or Camera (iOS).
6. Start coding:
- Select your favorite editor, like VSCode, Atom, Sublime Text, Vim, or Emacs,…
- Edit <projectname>/App.js: replace “Open up App.js to start working on your app” by "Hello
<yourname>"
1.1.2 Screenshots: