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
Returns the `firebase.User` (if logged in), a boolean to indicate whether the the user is still being loaded and any `firebase.FirebaseError` returned by Firebase when trying to load the user.
21
+
Retrieve and monitor the authentication state from Firebase.
22
22
23
23
The `useAuthState` hook takes the following parameters:
24
24
25
25
-`auth`: `firebase.auth.Auth` instance for the app you would like to monitor
26
26
27
+
Returns:
28
+
29
+
-`user`: The `firebase.User` if logged in, or `void` if not
30
+
-`loading`: A `boolean` to indicate whether the the authentication state is still being loaded
31
+
-`error`: Any `firebase.auth.Error` returned by Firebase when trying to load the user, or `void` if there is no error
Returns an array of `firebase.database.DataSnapshot` (if a reference is specified), a `boolean` to indicate if the data is still being loaded and any `firebase.FirebaseError` returned by Firebase when trying to load the data.
29
+
Retrieve and monitor a list value in the Firebase Realtime Database.
30
30
31
31
The `useList` hook takes the following parameters:
32
32
33
33
-`reference`: (optional) `firebase.database.Reference` for the data you would like to load
34
34
35
+
Returns:
36
+
37
+
-`snapshots`: an array of `firebase.database.DataSnapshot`, or `void` if no reference is supplied
38
+
-`loading`: a `boolean` to indicate if the data is still being loaded
39
+
-`error`: Any `firebase.FirebaseError` returned by Firebase when trying to load the data, or `void` if there is no error
As `useList`, but this hook returns a list of the `firebase.database.DataSnapshot.key` values, rather than the the `firebase.database.DataSnapshot`s themselves.
76
+
As `useList`, but this hooks extracts the `firebase.database.DataSnapshot.key` values, rather than the the `firebase.database.DataSnapshot`s themselves.
71
77
72
78
The `useListKeys` hook takes the following parameters:
73
79
74
80
-`reference`: (optional) `firebase.database.Reference` for the data you would like to load
75
81
82
+
Returns:
83
+
84
+
-`keys`: an array of `string`, or `void` if no reference is supplied
85
+
-`loading`: a `boolean` to indicate if the data is still being loaded
86
+
-`error`: Any `firebase.FirebaseError` returned by Firebase when trying to load the data, or `void` if there is no error
Returns a `firebase.database.DataSnapshot` (if a reference is specified), a `boolean` to indicate if the data is still being loaded and any `firebase.FirebaseError` returned by Firebase when trying to load the data.
115
+
Retrieve and monitor an object or primitive value in the Firebase Realtime Database.
97
116
98
117
The `useObject` hook takes the following parameters:
99
118
100
119
-`reference`: (optional) `firebase.database.Reference` for the data you would like to load
101
120
121
+
Returns:
122
+
123
+
-`snapshot`: a `firebase.database.DataSnapshot`, or `void` if no reference is supplied
124
+
-`loading`: a `boolean` to indicate if the data is still being loaded
125
+
-`error`: Any `firebase.FirebaseError` returned by Firebase when trying to load the data, or `void` if there is no error
0 commit comments