Reactive-Extensions / RxJS

The Reactive Extensions for JavaScript
http://reactivex.io
Other
19.49k stars 2.1k forks source link

About the official doc. #1463

Open mrdulin opened 7 years ago

mrdulin commented 7 years ago

For example, I want to unsubscribe a subscription:

https://github.com/Reactive-Extensions/RxJS/blob/master/doc/gettingstarted/creating.md

From this doc: I must do subscription.dispose();

http://reactivex.io/rxjs/manual/overview.html

But, from this doc, I must do subscription.unsubscribe();

I am confused which is the "correct" doc?

My rxjs version:

"rx": "^4.1.0",
paulpdaniels commented 7 years ago

dispose is the correct function for anything < 5.0.0.

= 5.0.0 should use unsubscribe.

The naming was changed between versions because Disposable which came from the .NET family of Rx was renamed as a Subscription.

You can find v5 source at https://github.com/ReactiveX/rxjs

mrdulin commented 7 years ago

@paulpdaniels Thanks very much! http://reactivex.io/rxjs/ This site is rxjs version >= 5.0.0? Where can I find the v4 doc? https://github.com/Reactive-Extensions/RxJS/blob/master/doc/api/ Is it?

paulpdaniels commented 7 years ago

@mrdulin sorry for the delay, yes that is correct