I have created a todo list web app using firestore ,where each todo item is stored as a document , Queries i want to perform :
I am able to do this but the issue here is i am getting all the documents returned by the query, but now i want to limit the data , and get more data when user reach end of current data while getting the updates in real time(for old fetched data like any content change in documents above)
Some ways i can think of is
which will be more efficient ? also if there is any other way please let me know
"Add a todo item to Firestore" and "Delete a todo item" are not queries, are just operations to add and delete documents to/from Firestore.
Get real-time updates of to-do items.
When it comes to reading data from Firestore, please note that as a collection gets larger your bill will be larger too. So you should always limit the data you read. If you want to read the data progressively, meaning reading data in smaller chunks then I recommend you implement pagination. While real-time pagination can be implemented, I recommend against it, since it can produce many reads. So I recommend you only use get() for paginating the results.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With