FirebaseExtended / reactfire

Hooks, Context Providers, and Components that make it easy to interact with Firebase.
https://firebaseopensource.com/projects/firebaseextended/reactfire/
MIT License
3.51k stars 399 forks source link

Disable observable timeouts for suspense #525

Closed Mythie closed 1 year ago

Mythie commented 2 years ago

Description

When using reactfire with react 17, any request that exceeds the default timeout of 30 seconds will then trigger the timeout handler that resets the observable.

Unfortunately, this resetting of the observable also means that the firstEmission promise never gets resolved leading to an infinite fallback state with suspense.

To resolve this, we pass along whether or not we are in suspense mode when creating an observable so we may conditionally choose to allow the timeout for resetting the observable.

google-cla[bot] commented 2 years ago

Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).

View this failed invocation of the CLA check for more information.

For the most up to date status, view the checks section at the bottom of the pull request.