True if the snapshot was created from cached data rather than guaranteed
up-to-date server data. If your listener has opted into metadata updates
(via SnapshotListenOptions)
you will receive another snapshot with fromCache set to false once
the client has received up-to-date data from the backend.
hasPendingWrites
hasPendingWrites:boolean
True if the snapshot contains the result of local writes (e.g. set() or
update() calls) that have not yet been committed to the backend.
If your listener has opted into metadata updates (via
SnapshotListenOptions) you will receive another
snapshot with hasPendingWrites equal to false once the writes have been
committed to the backend.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2022-07-27 UTC."],[],[],null,["- [firebase](/docs/reference/node/firebase).\n- [firestore](/docs/reference/node/firebase.firestore).\n- SnapshotMetadata \nMetadata about a snapshot, describing the state of the snapshot.\n\nIndex\n\nProperties\n\n- [fromCache](/docs/reference/node/firebase.firestore.SnapshotMetadata#fromcache)\n- [hasPendingWrites](/docs/reference/node/firebase.firestore.SnapshotMetadata#haspendingwrites)\n\nMethods\n\n- [isEqual](/docs/reference/node/firebase.firestore.SnapshotMetadata#isequal)\n\nProperties\n\nfromCache \nfromCache: boolean \nTrue if the snapshot was created from cached data rather than guaranteed\nup-to-date server data. If your listener has opted into metadata updates\n(via `SnapshotListenOptions`)\nyou will receive another snapshot with `fromCache` set to false once\nthe client has received up-to-date data from the backend.\n\nhasPendingWrites \nhasPendingWrites: boolean \nTrue if the snapshot contains the result of local writes (e.g. set() or\nupdate() calls) that have not yet been committed to the backend.\nIf your listener has opted into metadata updates (via\n`SnapshotListenOptions`) you will receive another\nsnapshot with `hasPendingWrites` equal to false once the writes have been\ncommitted to the backend.\n\nMethods\n\nisEqual\n\n- isEqual ( other : [SnapshotMetadata](/docs/reference/node/firebase.firestore.SnapshotMetadata) ) : boolean\n- Returns true if this `SnapshotMetadata` is equal to the provided one.\n\n Parameters\n -\n\n other: [SnapshotMetadata](/docs/reference/node/firebase.firestore.SnapshotMetadata) \n The `SnapshotMetadata` to compare against.\n\n Returns boolean\n\ntrue if this `SnapshotMetadata` is equal to the provided one."]]
Metadata about a snapshot, describing the state of the snapshot.