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
> **WARNING**: This branch is the work in progress for version 4 of ReactFire. [You can find version 3 here](https://github.com/firebaseextended/reactfire/tree/v3), if you're looking for documentation or to contribute to stable.
8
9
9
-
Hooks, Context Providers, and Components that make it easy to interact with
10
-
Firebase.
10
+
---
11
11
12
12
## What is ReactFire?
13
13
14
14
-**Easy realtime updates for your function components** - Hooks
15
15
like `useUser`and `useFirestoreCollection` let you easily subscribe to
16
16
auth state, realtime data, and all other Firebase SDK events. Plus, they automatically unsubscribe when your component unmounts.
17
17
-**Access Firebase libraries from any component** - Need the Firestore SDK? `useFirestore`. Remote Config? `useRemoteConfig`.
18
-
-**Built-in Support for prefetching** - Decrease your load times by starting a connection to products like Firestore, Auth, or Realtime Database before the component that consumes that data is rendered with functions like `preloadUser`
19
-
-**Safely configure Firebase libraries** - Libraries like Firestore and Remote Config require setting like `enablePersistence` to be set before any data fetches are made. This can be tough to support in React's world of re-renders. ReactFire gives you a trusted way to set these settings so you're sure they're set before anything else.
20
-
21
-
### Experimental [concurrent mode](https://reactjs.org/docs/concurrent-mode-suspense.html) features
22
-
23
-
-**Loading states handled by `<Suspense>`** - ReactFire's hooks throw promises
24
-
that Suspense can catch. No more `isLoaded ?...` - let React
25
-
[handle it for you](https://reactjs.org/docs/concurrent-mode-suspense.html).
26
-
-**Faster initial page load times** - Load only the code you need, when you need it, with `useFirestore`, `useAuth`, `useRemoteConfig`, and more.
27
-
-**Convenient components for common use cases** - Only want to render a component if a user is signed in? Wrap it in `<AuthCheck />`. Need to automatically instrument your `Suspense` load times with [RUM](https://firebase.google.com/docs/perf-mon)? Use `<SuspenseWithPerf />`.
18
+
-**Safely configure Firebase libraries** - Libraries like Firestore and Remote Config require settings like `enablePersistence` to be set before any data fetches are made. This can be tough to support in React's world of re-renders. ReactFire gives you `useInitFirestore` and `useInitRemoteConfig` hooks that guarantee they're set before anything else.
28
19
29
20
## Install
30
21
31
22
```bash
32
23
# npm
33
-
npm install --save reactfire firebase
24
+
npm install --save reactfire@exp firebase@exp
34
25
35
26
# or
36
27
37
28
# yarn
38
-
yarn add reactfire firebase
29
+
yarn add reactfire@exp firebase@exp
39
30
```
40
31
41
32
Depending on your targeted platforms you may need to install polyfills. The most commonly needed will be [globalThis](https://caniuse.com/#search=globalThis) and [Proxy](https://caniuse.com/#search=Proxy).
@@ -46,33 +37,32 @@ Depending on your targeted platforms you may need to install polyfills. The most
46
37
- Advanced: If you're using Concurrent Mode, check out the [Concurrent Mode quickstart](./docs/quickstart-concurrent-mode.md)
This repository is maintained by Googlers but is not a supported Firebase product. Issues here are answered by maintainers and other community members on GitHub on a best-effort basis.
106
102
107
-
## Contributors ✨
108
-
109
-
Thanks goes to these wonderful people ([emoji key](https://allcontributors.org/docs/en/emoji-key)):
110
-
111
-
<!-- ALL-CONTRIBUTORS-LIST:START - Do not remove or modify this section -->
### Extra Experimental [concurrent mode](https://reactjs.org/docs/concurrent-mode-suspense.html) features
124
104
125
-
<!-- ALL-CONTRIBUTORS-LIST:END -->
126
-
127
-
This project follows the [all-contributors](https://github.com/all-contributors/all-contributors) specification. Contributions of any kind welcome!
105
+
-**Loading states handled by `<Suspense>`** - ReactFire's hooks throw promises
106
+
that Suspense can catch. No more `isLoaded ?...` - let React
107
+
[handle it for you](https://reactjs.org/docs/concurrent-mode-suspense.html).
108
+
-**Automatically instrument your `Suspense` load times** - Need to automatically instrument your `Suspense` load times with [RUM](https://firebase.google.com/docs/perf-mon)? Use `<SuspenseWithPerf />`.
0 commit comments