Skip to content

Commit 8dad1f2

Browse files
dylanwatsonsoftwareMaurice Ackel
authored andcommitted
Add documentation for the initialValue option
1 parent edab3f3 commit 8dad1f2

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

firestore/README.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -128,6 +128,7 @@ The `useCollectionData` hook takes the following parameters:
128128
- `options`: (optional) `Object` with the following parameters:
129129
- `snapshotListenOptions`: (optional) `firestore.SnapshotListenOptions` to customise how the collection is loaded
130130
- `snapshotOptions`: (optional) `firestore.SnapshotOptions` to customise how data is retrieved from snapshots
131+
- `initialValue`: (optional) the initial value returned by the hook, until data from the firestore query has loaded
131132

132133
Returns:
133134

@@ -154,6 +155,7 @@ The `useCollectionDataOnce` hook takes the following parameters:
154155
- `getOptions`: (optional) `Object` to customise how the collection is loaded
155156
- `source`: (optional): `'default' | 'server' | 'cache'` Describes whether we should get from server or cache.
156157
- `snapshotOptions`: (optional) `firestore.SnapshotOptions` to customise how data is retrieved from snapshots
158+
- `initialValue`: (optional) the initial value returned by the hook, until data from the firestore query has loaded
157159

158160
Returns:
159161

@@ -247,6 +249,7 @@ The `useDocumentData` hook takes the following parameters:
247249
- `options`: (optional) `Object` with the following parameters:
248250
- `snapshotListenOptions`: (optional) `firestore.SnapshotListenOptions` to customise how the collection is loaded
249251
- `snapshotOptions`: (optional) `firestore.SnapshotOptions` to customise how data is retrieved from snapshots
252+
- `initialValue`: (optional) the initial value returned by the hook, until data from the firestore query has loaded
250253

251254
Returns:
252255

@@ -273,6 +276,7 @@ The `useDocumentDataOnce` hook takes the following parameters:
273276
- `getOptions`: (optional) `Object` to customise how the collection is loaded
274277
- `source`: (optional): `'default' | 'server' | 'cache'` Describes whether we should get from server or cach
275278
- `snapshotOptions`: (optional) `firestore.SnapshotOptions` to customise how data is retrieved from snapshots
279+
- `initialValue`: (optional) the initial value returned by the hook, until data from the firestore query has loaded
276280

277281
Returns:
278282

0 commit comments

Comments
 (0)