[Vuejs]-Can't delay using data in Vue for after getting value from database

0πŸ‘

βœ…

I used setTimeout(function () { methotToCall(); }, 1000); thanks to this thread – stackoverflow.com/questions/24849/… and it "worked" so I’m gonna close this one. I’m sure this is not the right method, but it will work for a time. Thank’s for help πŸ™‚

0πŸ‘

If I correctly understand your question, you need to fetch the Firestore data in one of the lifecycle hooks before the component is mounted, for example created or mounted.

In the lifecycle hook, you asynchronously read the data from Firestore and compare the result to the desired values.

Leave a comment