Skip to content

Commit

Permalink
React native documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
tpmai22 committed Feb 5, 2022
1 parent da002a9 commit b762a3a
Showing 1 changed file with 32 additions and 0 deletions.
32 changes: 32 additions & 0 deletions docs/react-native.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
# React Native

## Installing React Native Expo

We will use [Expo](https://expo.dev/) to help us out developing our application. Installing the command line tool so you can run Expo commands.

```
npm install -g expo-cli
```

## Running the application

Open an `Metro Bundler` (deployment server) for testing and deployment purposes.

```
cd src/mobile
expo start
```

`Metro Bundler` give you the chance to test our application on `Android` simulator, `iOS` simulator or on a real device. Testing on `iOS` require `MacOS` and [Xcode](https://developer.apple.com/xcode/). On the other hand, [Android Studio](https://developer.android.com/studio?gclid=Cj0KCQiAuvOPBhDXARIsAKzLQ8HSP0n1tojsRjsEZhT2cWmUrps8u4oND0eAONViZsf9rqMk2gFpc_waAtJOEALw_wcB&gclsrc=aw.ds) providing virtual `Android` machine for testing purpose. In `Metro Bundler`, you can choose to generate `QR` code with the `tunnel` connection to have the app running on your physical device

Note: For `macOS` more [configuration](https://docs.expo.dev/workflow/android-studio-emulator/) will be needed if you want to use `Android Studio` to test the application

## Debugging

To bring up developer menu:

- On `Android` virtual machine: Cmd ⌘ + M or Ctrl + M
- On `iOS` virtual machine: Cmd ⌘ + D (on `iOS` sometime you will have to use Ctrl + D then Cmd ⌘ + D ) or Ctrl + D
- On physical devices: shake your device

Click on `debug remote JS` and then you can work on debugging the application using `Chrome developer tool`

0 comments on commit b762a3a

Please sign in to comment.