Skip to content

Instantly share code, notes, and snippets.

@bbachi
Last active February 11, 2019 18:33
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save bbachi/29242d930c504436a51869bdfd7f778b to your computer and use it in GitHub Desktop.
Save bbachi/29242d930c504436a51869bdfd7f778b to your computer and use it in GitHub Desktop.
old way of doing rxjs
//import { Observable } from 'rxjs/Observable';
import { Observable } from 'rxjs';
//import { Subject } from 'rxjs/Subject';
import { Subject } from 'rxjs';
//import { Subscription } from 'rxjs/Subscription';
import { Subscription } from 'rxjs';
//import { BehaviorSubject } from 'rxjs/BehaviorSubject';
import { BehaviorSubject } from 'rxjs';
// you can combine all in one statement
import { Subscription, Subject, Observable, BehaviorSubject, of } from 'rxjs';
//you can't chain takewhile, map, catch anymore, you should import instead
//import 'rxjs/add/operator/map';
//import 'rxjs/add/operator/takeWhile'
import { takeWhile, map, catchError } from 'rxjs/operators';
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment