Skip to content

Instantly share code, notes, and snippets.

@RazaShehryar
Created March 27, 2020 20:17
Show Gist options
  • Save RazaShehryar/c06eb084322e1d6a7b3572be4fae69f5 to your computer and use it in GitHub Desktop.
Save RazaShehryar/c06eb084322e1d6a7b3572be4fae69f5 to your computer and use it in GitHub Desktop.
import Firebase from "../Config/Firebase";
Firebase.firestore()
.collection("Requests")
.doc()
.get();
import firebase from "firebase/app";
import "firebase/firestore";
var firebaseConfig = {
apiKey: "XXX",
authDomain: "XXX",
databaseURL: "XXX",
projectId: "XXX",
storageBucket: "XXX",
messagingSenderId: "XXX",
appId: "XXX",
measurementId: "XXX"
};
const Firebase = firebase.initializeApp(firebaseConfig);
export default !firebase.apps.length ? Firebase : firebase.app();
@mauriciord
Copy link

mauriciord commented Mar 27, 2020

@RazaShehryar

import firebase from 'firebase';
import 'firebase/firestore';

I think you don't need the /app prefix, only import firebase from 'firebase'

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment