I have been trying to connect my wix website to my firebase DB. I’ve been looking all over the place trying to figure out how to get it to work. I found similar threads but have been unable to repeat their success. [ https://www.wix.com/corvid/forum/community-discussion/firebase-package-gave-error-firebase-firestore-is-not-a-function ] I have all sorts of package import errors.
In my current application (not on Wix) all I have in my JS file is
import firebase from 'firebase';
const firebaseConfig = {
...
};
firebase.initializeApp(firebaseConfig);
let firebaseConnection = firebase.firestore();
and then I am able to get the data that I need by doing
const docRef = firebaseConnection.collection('Data').doc('TestDoc');
return dispatch => {
docRef.get()
.then(response =>{
if (response.exists) {
console.log("Document Exists");
console.log(response.data().DATA);
}
else{
console.log("No such document!");
}
})
}
I am struggling to be able to get the connection for firebase however and getting import issues and package errors. Is there anyone out there with a succinct tutorial on how to connect their wix site to firebase?