Open an SSE subscription to the relay at the given path (e.g. /drive, /drive/<id>, /item?drive=<id>).
/drive
/drive/<id>
/item?drive=<id>
Path under the SSE relay's /v{version} root.
/v{version}
Lifecycle callbacks.
A subscription handle. Call close() to disconnect.
close()
const sub = subscribeToSSE('/drive', { onStart: (info) => console.log('connected', info), onUpdate: (doc) => console.log('drive changed', doc), onError: (err) => console.error(err),});// latersub.close(); Copy
const sub = subscribeToSSE('/drive', { onStart: (info) => console.log('connected', info), onUpdate: (doc) => console.log('drive changed', doc), onError: (err) => console.error(err),});// latersub.close();
Open an SSE subscription to the relay at the given path (e.g.
/drive,/drive/<id>,/item?drive=<id>).