Slide 12
Slide 12 text
stream
.pipe(
tap(() => startGame())
)
.subscribe();
import { fromEvent, merge } from 'rxjs';
import { tap } from 'rxjs/operators';
Stream operator helpers
Run it!
Stream creation helpers
Create a stream with
button click and keydown
Chain all operation(s)
const stream = merge(
fromEvent(btnStart, 'click'),
fromEvent(document, 'keydown')
);