You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm not sure wherever the original use case is supported, but it'd be great to have consistency between those methods. I've spent some time debugging a timing issue in my React application with a code like (where the navigate cause a read-sync in and use a suspense firestore cache):
constbatch=firestore().batch();constpost= ...
batch.set(...)batch.commit();// The changes will no be applied in the local firestore before after the call to navigate.navigate(`post/${post.id}`);
When using
.set
,.update
onDocumentReference
, we can directly do a.get
after without risking invalid data in the "local database".But since
WriteBatch.commit
is written as anAsyncFunction
, it defers the commit to the "local database" to the next event loop.I'm not sure wherever the original use case is supported, but it'd be great to have consistency between those methods. I've spent some time debugging a timing issue in my React application with a code like (where the
navigate
cause a read-sync in and use a suspense firestore cache):While it'll work with:
The text was updated successfully, but these errors were encountered: