flyd.on subscriptions cannot be removed
teod opened this issue · comments
Teo commented
Hello,
It's not possible to unsubscribe the .on listener on the flyd object. Shouldn't there be an .off method ? Is there a current workaround for this issue ?
Simon Friis Vindum commented
That is a good point. You're welcome to do a PR. Otherwise I'll look at it in 2-4 days.
Teo commented
Is using the map method a good workaround ?
startStream() {
"use strict";
this.stream = flyd.map((smth)=> {
...
}, SmthStream);
}
endStream() {
"use strict";
this.stream.end(true);
}
Simon Friis Vindum commented
Yes. You can very well do that!
Simon Friis Vindum commented