Skip to content

Instantly share code, notes, and snippets.

@stevermeister
Created March 28, 2017 09:02
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 stevermeister/8f30656f748a4559a19948ded09be712 to your computer and use it in GitHub Desktop.
Save stevermeister/8f30656f748a4559a19948ded09be712 to your computer and use it in GitHub Desktop.
const clicks$ = Rx.Observable.fromEvent(document, 'click');
const innerObservable$ = Rx.Observable.interval(1000);
clicks$.switchMap(event => innerObservable$)
.subscribe(val => console.log(val));
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment