Function SseStreamView

  • Live view of an x-sse streaming 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 - the ResourceConfig to stream (must be streaming).
    • pathParams - values to substitute into {param} path templates.

    Parameters

    • __namedParameters: SseStreamViewProps

    Returns Element