Sky
0
Q:

how to use tap()

      
        content_copy
      
      
        open_in_new
      
      import { fromEvent } from 'rxjs';
import { tap, map } from 'rxjs/operators';

const clicks = fromEvent(document, 'click');
const positions = clicks.pipe(
  tap(ev => console.log(ev)),
  map(ev => ev.clientX),
);
positions.subscribe(x => console.log(x));
    
0

New to Communities?

Join the community