-
Notifications
You must be signed in to change notification settings - Fork 9
Open
Description
The basic API simply streams change objects:
ripple.on('change', (name, change) => {}) // listen for all changes
ripple('resource').on('change', change => {}) // listen for changes to resourceUsers should also be able to subscribe using the ES6 Observable syntax:
ripple.subscribe({ next, error, complete })
ripple('resource').subscribe({ next, error, complete })
for await (change of ripple) {}
for await (change of ripple('resource')) {}I was thinking we could use the error handler if a stream throws, but it seems that according to this answer the observable wouldn't recover if error is called. Therefore, I don't think it should be used for application-level errors, but only when the stream is truly stopped (liked losing connection - although even that is recoverable 🤔).
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels