Skip to content

Commit

Permalink
Add documentation for the initialValue option
Browse files Browse the repository at this point in the history
  • Loading branch information
dylanwatsonsoftware authored and Maurice Ackel committed Oct 10, 2022
1 parent edab3f3 commit 8dad1f2
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions firestore/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -128,6 +128,7 @@ The `useCollectionData` hook takes the following parameters:
- `options`: (optional) `Object` with the following parameters:
- `snapshotListenOptions`: (optional) `firestore.SnapshotListenOptions` to customise how the collection is loaded
- `snapshotOptions`: (optional) `firestore.SnapshotOptions` to customise how data is retrieved from snapshots
- `initialValue`: (optional) the initial value returned by the hook, until data from the firestore query has loaded

Returns:

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

Returns:

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

Returns:

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

Returns:

Expand Down

0 comments on commit 8dad1f2

Please sign in to comment.