-
-
Save thiamsantos/6f262d878a89b5cdd6f75f8547f3e7f1 to your computer and use it in GitHub Desktop.
Reduce bundle size with RxJS patching
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { Observable } from 'rxjs/Observable'; | |
// then patch import only needed operators: | |
import 'rxjs/add/operator/map'; | |
import 'rxjs/add/observable/from'; | |
const foo = Observable.from([1, 2, 3]); | |
foo.map(x => x * 2).subscribe(n => console.log(n)); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment