Firestore return document when it gets updated
As we get the whole document when it is created, it would be nice to get it as well when it gets updated.
Example:
Online game where 4 people join together. In document, we have a list of players with their names. These names should be displayed for all players. Last user joins closing the session. To get the rest of the names after update the document with this last player, I need to do an extra read.
Problem:
I am making an entra call for every player, affecting my quota limitation.
Solution:
Return updated document.
9
votes
Daniel Rodríguez Ramírez
shared this idea
-
Alexander Trakhimenok commented
This is already implemented - https://firebase.google.com/docs/firestore/query-data/listen