loading...

re: Create a never offline web app! VIEW POST

FULL DISCUSSION
 

Hi! I have been trying to find how I can check whether a document 'create', 'update' or 'delete' happened on the cache when the device is offline.

The official documentation for AngularFire and Firestore only talks about ways to check whether you're receiving data from the server or the cache.

 

Hi Aritra.

Have a look here: firebase.google.com/docs/firestore...

You can use addSnapshotListener for your requirement:
"Local writes in your app will invoke snapshot listeners immediately. This is because of an important feature called "latency compensation." When you perform a write, your listeners will be notified with the new data before the data is sent to the backend."

 

Thanks a lot! This is exactly what I was looking for. 🙂

code of conduct - report abuse