I already set my internet access to Airplane Mode, however the metada fromCache is always false.
ref.onSnapshot((qrySnapshot) => {
console.log(qrySnapshot.metadata);
});
android log
01-15 11:26:09.518 15260 6986 I ReactNativeJS: { hasPendingWrites: false, fromCache: false }
(Update)
It seems, the app just needed to be restarted for the onSnapshot to behave properly.
@eugenecp I am reading that the module does not support enablePersistence. So, it does support offline caching for firestore?
Offline persistence doesn't seem to be working for firestore. If I turn off wifi, my data stops loading and I get Network Request Failed error. If I call firebase.firestore().enablePersistence() then I get Persistence is enabled by default on the Firestore SDKs
Offline persistence is working for authentication though. I just can't load any data from firestore that should already be cached.
+1
Most helpful comment
Offline persistence doesn't seem to be working for firestore. If I turn off wifi, my data stops loading and I get
Network Request Failederror. If I callfirebase.firestore().enablePersistence()then I getPersistence is enabled by default on the Firestore SDKsOffline persistence is working for authentication though. I just can't load any data from firestore that should already be cached.