Reactive-Extensions / RxJS

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

old-way rxjs operators and factory methods vs lettable ones #1540

Open maksfastovets opened 6 years ago

maksfastovets commented 6 years ago

I bumped into the problem with lettable operators, in particular, with timer.

For instance, this: import 'rxjs/add/operator/catch' -- still works and even changes Observable object globally so there's no need to import that 'catch' again in a certain ts file once it is imported in project module file.

And this: import 'rxjs/add/observable/timer' -- doesn't work anymore, instead: import { timer } 'rxjs/observable/timer' -- should be used and it doesn't modify Observable object, it is used as an independent function, and it cannot be imported globally, it should be imported in each ts file individually if it is needed.

Why is import 'rxjs/add/operator/catch' still in use and has its counterpart of import {catchError} from 'rxjs/operators/catchError' and import 'rxjs/add/observable/timer' is no longer in use?

Is there any documentation on the topic? On the import syntax migration?

Thank you.

klozano commented 6 years ago

any news on this?

paulpdaniels commented 6 years ago

This is the wrong repo. You want https://github.com/ReactiveX/rxjs