Unplugging subscribers
We saw how to subscribe to an EventStream and property using onValue
, onError
, and onEnd
. We can also unsubscribe the subscribers if we don't need them anymore.
These functions return a function for unsubscribing. To unsubscribe, we need to call the function returned by the subscriber function.