From bd239575b86fa05bf0e60c482d2b80377842fcc2 Mon Sep 17 00:00:00 2001 From: Tyler Dixon Date: Tue, 4 Aug 2026 15:26:36 -0700 Subject: [PATCH 1/2] docs: replace the concurrent mode note with a Suspense section The section claimed Suspense support would not be stable until after React 18, and pointed at three reactjs.org/docs/concurrent-mode pages that no longer exist. React 18 shipped in 2022 and concurrent mode was abandoned as a concept, so the setup guide it told readers to follow is gone. Replaces it with a plain Suspense section, adds a bullet to What is ReactFire, and states that suspense is off by default, which the old text never said. Keeps the suspense={true} snippet and the SuspenseWithPerf mention. The stale part was the concurrent mode framing and its dead links, not the usage documentation, and the README was the only prose reference to either outside the generated API report. Closes #756 --- README.md | 16 +++++++--------- 1 file changed, 7 insertions(+), 9 deletions(-) diff --git a/README.md b/README.md index 880b18ed..f3c741ca 100644 --- a/README.md +++ b/README.md @@ -10,6 +10,7 @@ Firebase. auth state, realtime data, and all other Firebase SDK events. Plus, they automatically unsubscribe when your component unmounts. - **Access Firebase libraries from any component** - Need the Firestore SDK? `useFirestore`. Remote Config? `useRemoteConfig`. - **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. +- **Optional `` support** - Hand loading states to React instead of checking a status yourself. Off by default, opt in with the `suspense` prop. See [Suspense](#suspense) below. ## Platform support @@ -93,19 +94,16 @@ render( 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. -### Extra Experimental [concurrent mode](https://reactjs.org/docs/concurrent-mode-suspense.html) features +## Suspense -These features are marked as *extra experimental* because they use experimental React features that [will not be stable until sometime after React 18 is released](https://github.com/reactwg/react-18/discussions/47#:~:text=Likely%20after%20React%2018.0%3A%20Suspense%20for%20Data%20Fetching). +ReactFire's hooks can throw promises for [``](https://react.dev/reference/react/Suspense) to catch, so React handles loading states for you instead of you checking `status` on each result. -- **Loading states handled by ``** - ReactFire's hooks throw promises - that Suspense can catch. Let React - [handle loading states for you](https://reactjs.org/docs/concurrent-mode-suspense.html). -- **Automatically instrument your `Suspense` load times** - Need to automatically instrument your `Suspense` load times with [RUM](https://firebase.google.com/docs/perf-mon)? Use ``. - -Enable concurrent mode features by following the [concurrent mode setup guide](https://reactjs.org/docs/concurrent-mode-adoption.html#installation) and then setting the `suspense` prop in `FirebaseAppProvider`: +This is **off by default**. Opt in with the `suspense` prop on `FirebaseAppProvider`: ```jsx ``` -See concurrent mode code samples in [example/withSuspense](https://github.com/FirebaseExtended/reactfire/tree/main/example/withSuspense) +`` does the same and also instruments load times with [Performance Monitoring](https://firebase.google.com/docs/perf-mon). + +See [example/withSuspense](https://github.com/FirebaseExtended/reactfire/tree/main/example/withSuspense) for full samples. From e1dba04ab297a61a593a7874bb26fefd9fc2d09f Mon Sep 17 00:00:00 2001 From: Tyler Dixon Date: Wed, 5 Aug 2026 10:47:16 -0700 Subject: [PATCH 2/2] docs: describe SuspenseWithPerf's actual timing mechanism SuspenseWithPerf measures with the browser User Timing API (performance.mark / performance.measure) and is not wired to the Firebase Performance SDK; src/performance.tsx still carries a 'Should this import firebase/performance?' TODO. The old text linked the Performance Monitoring docs, so the claim is inherited rather than new, but this PR rewrites that sentence anyway. Reported by Armando in review of #778. --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index f3c741ca..ae630e37 100644 --- a/README.md +++ b/README.md @@ -104,6 +104,6 @@ This is **off by default**. Opt in with the `suspense` prop on `FirebaseAppProvi ``` -`` does the same and also instruments load times with [Performance Monitoring](https://firebase.google.com/docs/perf-mon). +`` does the same and also measures how long the fallback was shown, using the browser's [User Timing API](https://developer.mozilla.org/en-US/docs/Web/API/Performance_API/User_timing). See [example/withSuspense](https://github.com/FirebaseExtended/reactfire/tree/main/example/withSuspense) for full samples.