externalize `[un]observe` API - eliminate source modification
gullerya opened this issue · comments
Yuri Guller commented
Right now, there are 2 methods that are set on the source
object when turned into Observable
: observe
and unobserve
, thus 'patching' the source, which is not perfect.
As per discussion in issue #110 and as suggested by @Stnaire those method may reside as a static once on the Observable
factory, while the observable instance self remain unchanged, something like:
const observable = Observable.from(source);
Observable.observe(observable, () => {...});
If this path will prove itself and be taken, roadmap should be:
- add the new APIs in v4 (current one)
- remark the old APIs as deprecated in v4
- drop old APIs starting from v5