How to create a React Native app (1)? Setup Expo

Setup Expo

Install expo CLI

npm install --global expo-cli

Install expo Development Client

https://docs.expo.dev/clients/getting-started/

npx crna -t with-dev-client

or

expo init my-project

Run iOS

Build

expo run:ios

This needs to be re-run every time a new native module is installed

Run

expo start --dev-client

Run Android

Build

expo run:android

Run

expo start --dev-client

Setup Typescript

  • Create a .tsx file in your project and re-run expo start –dev-client, Expo will automatically ask you to install TypeScript packages

Debug in Expo

Chrome remote debug JS

  • App crashes when trying “Remote debug JS” in Android, have to use “console.log”
  • iOS is fine

Create native module

Be the first to comment

Leave a Reply

Your email address will not be published.


*