@@ -71,7 +71,7 @@ const FirestoreCollection = () => {
71
71
{value && (
72
72
< span>
73
73
Collection: {' ' }
74
- {value .docs .map (doc => (
74
+ {value .docs .map (( doc ) => (
75
75
< React .Fragment key= {doc .id }>
76
76
{JSON .stringify (doc .data ())},{' ' }
77
77
< / React .Fragment >
@@ -107,7 +107,7 @@ Returns:
107
107
### useCollectionData
108
108
109
109
``` js
110
- const [values , loading , error ] = useCollectionData< T > (query, options);
110
+ const [values , loading , error ] = useCollectionData < T > (query, options);
111
111
```
112
112
113
113
As ` useCollection ` , but this hook extracts a typed list of the ` firebase.firestore.QuerySnapshot.docs ` values, rather than the
@@ -120,6 +120,7 @@ The `useCollectionData` hook takes the following parameters:
120
120
- ` idField ` : (optional) name of the field that should be populated with the ` firebase.firestore.QuerySnapshot.id ` property.
121
121
- ` refField ` : (optional) name of the field that should be populated with the ` firebase.firestore.QuerySnapshot.ref ` property.
122
122
- ` snapshotListenOptions ` : (optional) ` firebase.firestore.SnapshotListenOptions ` to customise how the collection is loaded
123
+ - ` snapshotOptions ` : (optional) ` firebase.firestore.SnapshotOptions ` to customise how data is retrieved from snapshots
123
124
124
125
Returns:
125
126
@@ -130,7 +131,7 @@ Returns:
130
131
### useCollectionDataOnce
131
132
132
133
``` js
133
- const [values , loading , error ] = useCollectionDataOnce< T > (query, options);
134
+ const [values , loading , error ] = useCollectionDataOnce < T > (query, options);
134
135
```
135
136
136
137
As ` useCollectionData ` , but this hook will only read the current value of the ` firebase.firestore.Query ` .
@@ -142,6 +143,7 @@ The `useCollectionDataOnce` hook takes the following parameters:
142
143
- ` getOptions ` : (optional) ` firebase.firestore.GetOptions ` to customise how the collection is loaded
143
144
- ` idField ` : (optional) name of the field that should be populated with the ` firebase.firestore.QuerySnapshot.id ` property.
144
145
- ` refField ` : (optional) name of the field that should be populated with the ` firebase.firestore.QuerySnapshot.ref ` property.
146
+ - ` snapshotOptions ` : (optional) ` firebase.firestore.SnapshotOptions ` to customise how data is retrieved from snapshots
145
147
146
148
Returns:
147
149
@@ -216,7 +218,7 @@ Returns:
216
218
### useDocumentData
217
219
218
220
``` js
219
- const [value , loading , error ] = useDocumentData< T > (reference, options);
221
+ const [value , loading , error ] = useDocumentData < T > (reference, options);
220
222
```
221
223
222
224
As ` useDocument ` , but this hook extracts the typed contents of ` firebase.firestore.DocumentSnapshot.val() ` , rather than the
@@ -229,6 +231,7 @@ The `useDocumentData` hook takes the following parameters:
229
231
- ` idField ` : (optional) name of the field that should be populated with the ` firebase.firestore.DocumentSnapshot.id ` property.
230
232
- ` refField ` : (optional) name of the field that should be populated with the ` firebase.firestore.QuerySnapshot.ref ` property.
231
233
- ` snapshotListenOptions ` : (optional) ` firebase.firestore.SnapshotListenOptions ` to customise how the collection is loaded
234
+ - ` snapshotOptions ` : (optional) ` firebase.firestore.SnapshotOptions ` to customise how data is retrieved from snapshots
232
235
233
236
Returns:
234
237
@@ -239,7 +242,7 @@ Returns:
239
242
### useDocumentDataOnce
240
243
241
244
``` js
242
- const [value , loading , error ] = useDocumentDataOnce< T > (reference, options);
245
+ const [value , loading , error ] = useDocumentDataOnce < T > (reference, options);
243
246
```
244
247
245
248
As ` useDocument ` , but this hook will only read the current value of the ` firebase.firestore.DocumentReference ` .
@@ -251,6 +254,7 @@ The `useDocumentDataOnce` hook takes the following parameters:
251
254
- ` getOptions ` : (optional) ` firebase.firestore.GetOptions ` to customise how the collection is loaded
252
255
- ` idField ` : (optional) name of the field that should be populated with the ` firebase.firestore.DocumentSnapshot.id ` property.
253
256
- ` refField ` : (optional) name of the field that should be populated with the ` firebase.firestore.QuerySnapshot.ref ` property.
257
+ - ` snapshotOptions ` : (optional) ` firebase.firestore.SnapshotOptions ` to customise how data is retrieved from snapshots
254
258
255
259
Returns:
256
260
0 commit comments