createReactiveStoreFromDataPublisherFactory
Returns a ReactiveStreamStore that wires itself to a fresh DataPublisher on every `connect()`.
The store 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:
- The returned store starts in
status: 'idle'. Callconnect()to open the first stream. - On error, the store transitions to
status: 'error'preserving the last known value. Only the first error per connection window is captured — a subsequentconnect()resets that window. connect()aborts any currently active connection and invokes the factory again, transitioning throughretrying(preserving stale data) when called from a non-idle state. If the factory rejects, the store transitions tostatus: 'error'with the rejection reason.- `reset()` aborts the current connection and returns to
idle, clearing bothdataanderror. - Triggering the caller's
abortSignaldisconnects the store permanently; subsequentconnect()calls are no-ops.
Type Parameters
| Type Parameter |
|---|
TData |
Parameters
| Parameter | Type | Description |
|---|---|---|
config | FactoryConfig | - |
Returns
ReactiveStreamStore<TData>