@@ -37,7 +37,7 @@ Parameters:
3737- ` auth ` : ` firebase.auth.Auth `
3838
3939Returns:
40- ` AuthState ` containing:
40+ ` AuthStateHook ` containing:
4141- ` initialising ` : If the listener is still waiting for the user to be loaded
4242- ` user ` : The ` firebase.User ` , or ` null ` , if no user is logged in
4343
@@ -90,7 +90,7 @@ Parameters:
9090- ` query ` : ` firebase.firestore.Query `
9191
9292Returns:
93- ` CollectionValue ` containing
93+ ` CollectionHook ` containing
9494- ` error ` : An optional ` firebase.FirebaseError ` returned by Firebase
9595- ` loading ` : A ` boolean ` to indicate if the listener is still being loaded
9696- ` value ` : A ` firebase.firestore.QuerySnapshot `
@@ -126,7 +126,7 @@ Parameters:
126126- ` docRef ` : ` firebase.firestore.DocumentReference `
127127
128128Returns:
129- ` DocumentValue ` containing
129+ ` DocumentHook ` containing
130130- ` error ` : An optional ` firebase.FirebaseError ` returned by Firebase
131131- ` loading ` : A ` boolean ` to indicate if the listener is still being loaded
132132- ` value ` : A ` firebase.firestore.DocumentSnapshot `
@@ -168,7 +168,7 @@ Parameters:
168168- ` ref ` : ` firebase.database.Reference `
169169
170170Returns:
171- ` ListValue ` containing
171+ ` ListHook ` containing
172172- ` error ` : An optional error object returned by Firebase
173173- ` loading ` : A ` boolean ` to indicate if the listener is still being loaded
174174- ` value ` : A list of ` firebase.database.DataSnapshot `
@@ -199,13 +199,30 @@ const DatabaseList = () => {
199199};
200200```
201201
202+ #### ` useListVal<T>(ref, keyField) `
203+
204+ As above, but this hook returns a typed list of the ` DataSnapshot.val() ` values, rather than the the
205+ ` DataSnapshot ` s themselves.
206+
207+ Parameters:
208+ - ` ref ` : ` firebase.database.Reference `
209+ - ` keyField ` : (Optional) Name of field that should be populated with the ` DataSnapshot.key ` property
210+
211+ Returns:
212+ ` ListValHook ` containing
213+ - ` error ` : An optional error object returned by Firebase
214+ - ` loading ` : A ` boolean ` to indicate if the listener is still being loaded
215+ - ` value ` : A list of the contents of ` firebase.database.DataSnapshot.val() ` and optional key field
216+
217+ ```
218+
202219#### `useObject(ref)`
203220
204221Parameters:
205222- `ref`: `firebase.database.Reference`
206223
207224Returns:
208- ` ObjectValue ` containing
225+ `ObjectHook ` containing
209226- `error`: An optional error object returned by Firebase
210227- `loading`: A `boolean` to indicate if the listener is still being loaded
211228- `value`: A `firebase.database.DataSnapshot`
@@ -239,10 +256,10 @@ Parameters:
239256- ` ref ` : ` firebase.database.Reference `
240257
241258Returns:
242- ` ObjectValue ` containing
259+ ` ObjectValHook ` containing
243260- ` error ` : An optional error object returned by Firebase
244261- ` loading ` : A ` boolean ` to indicate if the listener is still being loaded
245- - ` value ` : A ` firebase.database.DataSnapshot `
262+ - ` value ` : The contents of ` firebase.database.DataSnapshot.val() `
246263
247264```
248265
0 commit comments