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
Retrieve the current value of the `firestore.DocumentReference`.
@@ -225,6 +225,7 @@ Returns:
225
225
-`snapshot`: a `firestore.DocumentSnapshot`, or `undefined` if no reference is supplied
226
226
-`loading`: a `boolean` to indicate if the data is still being loaded
227
227
-`error`: Any `firestore.FirestoreError` returned by Firebase when trying to load the data, or `undefined` if there is no error
228
+
-`reload()`: a function that can be called to trigger a reload of the data
228
229
229
230
### useDocumentData
230
231
@@ -253,7 +254,7 @@ Returns:
253
254
### useDocumentDataOnce
254
255
255
256
```js
256
-
const [value, loading, error, snapshot] =
257
+
const [value, loading, error, snapshot, reload] =
257
258
useDocumentDataOnce <T> (reference, options);
258
259
```
259
260
@@ -273,6 +274,7 @@ Returns:
273
274
-`loading`: a `boolean` to indicate if the data is still being loaded
274
275
-`error`: Any `firestore.FirestoreError` returned by Firebase when trying to load the data, or `undefined` if there is no error
275
276
-`snapshot`: a `firestore.DocumentSnapshot`, or `undefined` if no query is supplied. This allows access to the underlying snapshot if needed for any reason, e.g. to view the snapshot metadata
277
+
-`reload()`: a function that can be called to trigger a reload of the data
0 commit comments