Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // Comment for https://stackoverflow.com/a/75048174/8234174
- const source = new Subject();
- const one = new Subject();
- const two = new Subject();
- source.pipe(awaitLatestFrom([one, two])).subscribe(data => console.log('Entered with data:', data));
- source.next('A');
- one.next("One")
- source.next('B');
- two.next("Two")
- // Will not log "Entered with data", as 'one' has not fired again since 'source' has nexted value 'B'
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement