Create a new project from Firebase Console.
Create a Firestore Database from the project.
Visit
Project settings > General > Your apps > Add Web App
Copy firebaseConfig
constant and replace it with the code below.
You also need firebase.js
at the root file of your project.
import * as firebase from 'firebase';
import 'firebase/auth';
import "firebase/firestore";
const firebaseConfig = {
// PASTE YOURS HERE.
apiKey: ***Your api key***,
authDomain: "***",
projectId: "***",
storageBucket: "***",
messagingSenderId: "***",
appId: "***"
//
};
let app;
if (firebase.default.apps.length === 0) {
app = firebase.default.initializeApp(firebaseConfig);
} else {
app = firebase.default.app()
}
const auth = firebase.default.auth();
const storage = firebase.default.firestore();
export { auth, storage };
Assuming that you have Node 14 LTS or greater installed, you can use npm to install the Expo CLI command line utility:
npm install -g expo-cli
Then run the following commands to install dependencies:
npm install
npm start # you can also use: expo start
This will start a development server for you.