Skip to content

Manual

Rx.manual lets you create a reactive from scratch.

Create it and provide some options to handle key states:

const rx = Rx.manual({
onDispose(reason) {
// Called when stream is disposed
},
onFirstSubscribe() {
// Called when we go from no subscribers to at least one
},
onNoSubscribers() {
// Called when all subscribers are removed
}
})

And then you can use .set() to set values and read it as usual.