- Install yarn
$ brew install yarn
- Clone this repo, and install the dependencies:
$ yarn
- Install
expo-cli
globally
$ yarn global add expo-cli
-
Install expo client in your device:
-
Run the project and open it on your device.
$ yarn start
- Scan the QR code to open the expo app.
Note: Your mobile device should be on the same network as your computer.
The content of each exercise is inside the /exercises folder. To test each one, you should import the exercise you want to do in App.js
. Also, the solution of each exercise is inside /solutions folder.
- To create an application called
PostApp
in this case, you have to run:
$ expo init PostApp
- Choose an empty template and name it
PostApp
.
Follow Firebase official guides
Or made this quick guide:
- In the Firebase console, click
Add project
with the project namePostApp
. The project ID and analytics account are optional. - Then, add a web app with the project name
PostApp Web
and copy the firebaseConfig variable. - Go to the
Cloud Firestore
tab, and click on theCreate database
button. Check Start in test mode. Select the default region andDone
. - Create a new collection, called
Posts
with the following attributes:
title -> string
body -> string
createdAt -> timestamp
author -> string
- Add
firebase
dependency:
$ yarn add firebase
- Create a file with firebase configuration:
$ touch firebase.js
import * as firebase from "firebase";
import "firebase/firestore";
const firebaseConfig = {
// YOUR CREDENTIALS HERE
};
if (firebase.apps.length === 0) {
firebase.initializeApp(firebaseConfig);
}
export default firebase.firestore();
And now you could do the exercises written in this workshop.