Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

this.$db is not a function #16

Open
mangomkt opened this issue Aug 24, 2020 · 2 comments
Open

this.$db is not a function #16

mangomkt opened this issue Aug 24, 2020 · 2 comments

Comments

@mangomkt
Copy link

When I try to use
this.$db.collection('events').get().then(snapshot => console.log(snapshot.size))

I get this.$db is not a function

It seems the mounted is running before firebase is up and running

@u12206050
Copy link
Owner

Have you tried using the onInit function instead? It fires when the firebase connection is established.

@mangomkt
Copy link
Author

mangomkt commented Sep 14, 2020

@u12206050 OK I will try that.... another thing I noticed is when I deploy the site (I am using netlify) it seems there is some kind of cache... I make an update to the firestore and it is not showing unless I redeploy

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants