Xhr Event Source Install npm install --save xhr-event-source Usage import { xhrEventSource, type XHREventSourceInit } from 'xhr-event-source'; xhrEventSource('/api/sse', { onmessage: (msg) => { console.log(msg); }, });