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
> [Hooks](https://reactjs.org/docs/hooks-intro.html) are a new feature proposal that lets you use state and other React features without writing a class. They’re currently in React v16.7.0-alpha and being discussed in an open RFC.
8
+
> [Hooks](https://reactjs.org/docs/hooks-intro.html) are a new feature proposal that lets you use state and other React features without writing a class. They were first added in the React v16.7.0-alpha and are being discussed in an open RFC. They did not make it into the released v16.7.0, but are currently available in the React v16.8.0-alpha stream.
9
9
10
10
> Hooks are not currently supported in React Native - as soon as they are, we'll make sure that React Firebase Hooks works with both the Firebase JS SDK and React Native Firebase.
11
11
12
12
## Installation
13
13
14
-
React Firebase Hooks requires **React 16.7.0-alpha.0 or later** and **Firebase v5.0.0 or later**.
14
+
React Firebase Hooks requires **React 16.7.0-alpha.0, React 16.8.0-alpha.0 or later** and **Firebase v5.0.0 or later**.
15
15
16
16
```
17
17
npm install --save react-firebase-hooks
@@ -23,7 +23,7 @@ This assumes that you’re using the [npm](https://npmjs.com) package manager wi
23
23
24
24
It's clear that there is a **lot** of hype around React Hooks despite them still being in alpha, but this hype merely reflects that there are obvious real world benefits to React developers everywhere.
25
25
26
-
This library explores how React Hooks can work to make integration with Firebase even more straightforward than it already is. It takes inspiration for naming from RxFire and is based on an internal library that we have used in a number of apps prior to the release of React Hooks. The implementation with hooks is 10x simpler than our previous implementation.
26
+
This library explores how React Hooks can work to make integration with Firebase even more straightforward than it already is. It takes inspiration for naming from RxFire and is based on an internal library that we have used in a number of apps prior to the release of React Hooks. The implementation with hooks is 10x simpler than our previous implementation.
27
27
28
28
## Documentation
29
29
@@ -34,10 +34,12 @@ React Firebase Hooks provides a convenience listener for Firebase Auth's auth st
34
34
#### `useAuthState(auth)`
35
35
36
36
Parameters:
37
+
37
38
-`auth`: `firebase.auth.Auth`
38
39
39
40
Returns:
40
41
`AuthStateHook` containing:
42
+
41
43
-`initialising`: If the listener is still waiting for the user to be loaded
42
44
-`user`: The `firebase.User`, or `null`, if no user is logged in
0 commit comments