- To get started, install expo ->
npm install -g expo-cli
- Login Expo with
expo login
- Generate a test app with
expo init MyApp
- Edit
App.js
file and start project withexpo start
This will start up Metro Server in your development machine. - To start and run on android
expo start --android
.
Deploy React App to Github-Pages
-
git init
-
git remote add origin git@github.com:username/repo.git
-
yarn add -D gh-pages
-
Update
package.json
"homepage": `"http://username.github.io/repo" "scripts": { ... "deploy": "gh-pages -d web-build", "predeploy": "expo build:web" }
yarn deploy
predeploy is automatically run before deploy.
- When asked about the public path, make sure to specify the
web-build
folder. - Answer 'Configure as a single-page app (rewrite all urls to /index.html)' with 'Yes'.
- Update
package.json
"scripts": { ... "predeploy": "expo build:web", "deploy-hosting": "npm run predeploy && firebase deploy --only hosting", }