Subscribes to the resource's event stream (via useResource().stream),
stamps each event with _received_at/_seq, appends it to the shared SSE
cache, and shows a snackbar with the formatted event. Renders the connection
status, a running event count, and the latest event's formatted text;
shows "Waiting for events…" until the first event arrives. Cached events
are restored on mount; the connection flag is reset on unmount.
Props:
resource - the ResourceConfig to stream (must be streaming).
pathParams - values to substitute into {param} path templates.
Live view of an
x-ssestreaming resource.Subscribes to the resource's event stream (via
useResource().stream), stamps each event with_received_at/_seq, appends it to the shared SSE cache, and shows a snackbar with the formatted event. Renders the connection status, a running event count, and the latest event's formatted text; shows "Waiting for events…" until the first event arrives. Cached events are restored on mount; the connection flag is reset on unmount.Props:
resource- theResourceConfigto stream (must bestreaming).pathParams- values to substitute into{param}path templates.