Subscribe to a Server-Sent Events (SSE) stream for a single item.
Opens an EventSource for url (resolved against the shared API base URL)
and pushes each parsed JSON message onto events. Connection state is
exposed via connected. Pass null to disable the subscription; the socket
is closed and connected reset on unmount or when url changes. Malformed
JSON payloads are ignored.
Parameters
url: null|string
Absolute-from-base path of the stream, or null to disable.
handlers: ItemSseHandlers
onEvent (per message), plus optional onOpen/onError.
Returns ItemSseResult
{ connected, events } for the active subscription.
Subscribe to a Server-Sent Events (SSE) stream for a single item.
Opens an
EventSourceforurl(resolved against the shared API base URL) and pushes each parsed JSON message ontoevents. Connection state is exposed viaconnected. Passnullto disable the subscription; the socket is closed andconnectedreset on unmount or whenurlchanges. Malformed JSON payloads are ignored.