I\'m having trouble getting Firebase Firestore to work with the basic create-react-app boilerplate. Does anyone have a working sample?
The Get Started doc only expla
I created a config file for firebase:
import * as firebase from 'firebase';
const config = { /* COPY THE ACTUAL CONFIG FROM FIREBASE CONSOLE */
apiKey: "apiKey",
authDomain: "domen.firebaseapp.com",
databaseURL: "https://domen.firebaseio.com",
projectId: "lavs-mercury",
storageBucket: "",
messagingSenderId: "id"
};
export default firebase.initializeApp(config);
Then I just import this module to file where I want to use. For example:
import * as actionTypes from './actionTypes';
import firebase from "../../firebase-module";
export const logout = () => {
firebase.auth().signOut();
return {
type: actionTypes.LOGOUT
}
};