gdg-tangier / vue-firestore

:cloud: Cloud Firestore binding in realtime with Vuejs
MIT License
235 stars 28 forks source link

Differentiate between empty collection and not-yet-loaded state #22

Closed reneroth closed 6 years ago

reneroth commented 6 years ago

As the title implied, there's a difference between a collection being empty and a collection simply not yet being loaded, yet we are receiving an empty array for both cases. How can I check for this?

amranidev commented 6 years ago

Hi @reneroth.

if I understand your question, I think if you bind a collection manually by using $binding it will return a promise, which you can check if the collection is empty or not loaded yet.

I think it would be a good feature to have if we add ready callback prop in the $firestore and I'm thinking about that.

Thank you!

reneroth commented 6 years ago

Thank you - for your fast help and a great library!