Monday, May 20, 2024
 Popular · Latest · Hot · Upcoming
190
rated 0 times [  192] [ 2]  / answers: 1 / hits: 23450  / 6 Years ago, sun, february 4, 2018, 12:00:00

I'm using google's firestore and I want to get a live update on the entire collection.



I saw this in the documents:
https://cloud.google.com/nodejs/docs/reference/firestore/0.11.x/CollectionReference#onSnapshot



but as far as I understood I have to get a document or to query a range of documents.



how can I listen to changes in the entire collection?


More From » node.js

 Answers
444

If you refer back to the Listen to multiple documents in a collection documentation, simply omit the where filter and you should get the whole collection.



The first line would look like this: var query = db.collection(cities);


[#55266] Thursday, February 1, 2018, 6 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
danyelletyanah

Total Points: 204
Total Questions: 109
Total Answers: 108

Location: Vanuatu
Member since Fri, Oct 22, 2021
3 Years ago
;