createReactiveStoreFromDataPublisherFactory
Returns a ReactiveStreamStore that wires itself to a fresh DataPublisher on construction and on every `retry()`.
Unlike createReactiveStoreFromDataPublisher, this variant accepts a createDataPublisher
factory rather than a ready-made publisher. That lets the store tear down a broken stream and
open a new one without losing subscribers or the last known value.
Things to note:
getUnifiedState()starts instatus: 'loading'until the first notification arrives.- On error, the store transitions to
status: 'error'preserving the last known value. Only the first error per connection window is captured — a subsequentretry()resets that window. retry()is a no-op unless the store is currently instatus: 'error'. When it fires, the store transitions tostatus: 'retrying'(preserving stale data), invokescreateDataPublisher(), and wires up a fresh connection. If the factory rejects, the store transitions tostatus: 'error'with the rejection reason.- Triggering the caller's
abortSignaldisconnects the store permanently; subsequentretry()calls are no-ops.
Type Parameters
| Type Parameter |
|---|
TData |
Parameters
| Parameter | Type | Description |
|---|---|---|
config | FactoryConfig | - |
Returns
ReactiveStreamStore<TData>