Problem
Once a reactfire hook enters status: 'error', there is no way to recover without remounting with a different observableId.
The errored SuspenseSubject stays in the global preloadedObservables cache under its observableId. On error, the 30-second reset timer is cancelled (it becomes a no-op timeout), and the observable does not re-subscribe. A component that remounts with the same observableId rejoins the same errored subject and immediately receives status: 'error' again.
This became user-visible in v4.3.0, which made status: 'error' reachable in non-suspense mode (previously errors always threw, so the stuck state was hidden). Users building status === 'error' UI now have no way to trigger a retry.
Current workaround
Change the observableId passed to the hook. This causes preloadObservable to create a fresh SuspenseSubject and re-subscribe to the source. Not a real API — just an escape hatch.
What a fix might look like
- An explicit
retry() / reset() function returned from the hook, or
- A
retryOnError option that re-subscribes automatically after a delay, or
- Cache eviction on error after the reset timeout (restoring the pre-v4.3 behavior for the cache entry, not for error surfacing)
The right shape is an open question. Filing to track the gap.
Closes none. Related to #735.
Problem
Once a reactfire hook enters
status: 'error', there is no way to recover without remounting with a differentobservableId.The errored
SuspenseSubjectstays in the globalpreloadedObservablescache under itsobservableId. On error, the 30-second reset timer is cancelled (it becomes a no-op timeout), and the observable does not re-subscribe. A component that remounts with the sameobservableIdrejoins the same errored subject and immediately receivesstatus: 'error'again.This became user-visible in v4.3.0, which made
status: 'error'reachable in non-suspense mode (previously errors always threw, so the stuck state was hidden). Users buildingstatus === 'error'UI now have no way to trigger a retry.Current workaround
Change the
observableIdpassed to the hook. This causespreloadObservableto create a freshSuspenseSubjectand re-subscribe to the source. Not a real API — just an escape hatch.What a fix might look like
retry()/reset()function returned from the hook, orretryOnErroroption that re-subscribes automatically after a delay, orThe right shape is an open question. Filing to track the gap.
Closes none. Related to #735.