Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Allow tap operator after takeUntil

See original GitHub issue

Give that tap’s contract is that it can perform side effects but returns an identical Observable, is it not safe to follow a takeUntil with a tap (and thus allow it here)


const stream$ = of().pipe(
    tap((datasets) => { setSomeState(true) })

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:12 (7 by maintainers)

github_iconTop GitHub Comments

cartantcommented, Nov 23, 2020

… and it’s not possible that there was some kind of race condition. Is that right?

Yeah, there’s no race here, the unsubscription is synchronous.

cartantcommented, Nov 23, 2020

No worries. At some stage, I’ll see if I can make some changes to the docs - and/or failure messages - to better explain what’s going on.

Read more comments on GitHub >

github_iconTop Results From Across the Web

how to take an action after takeUntil rxjs function
You can use the merge operator and reuse your takeUntil condition to create a mapped true value when the condition ( endtimer )...
Read more >
takeUntil - Learn RxJS
import { takeUntil } from 'rxjs/operators';. ​. //emit value every 1s ... //when timer emits after 5s, complete source ... //only allow values...
Read more >
How To Use the takeUntil RxJS Operator to Manage ...
Learn how to use the takeUntil operator to unsubscribe from observables when your Angular components are destroyed.
Read more >
RxJS: Avoiding takeUntil Leaks - ncjamieson
Using the takeUntil operator to automatically unsubscribe from an observable is a mechanism that's explained in Ben Lesh's Don't Unsubscribe ...
Read more >
tap - RxJS
Tap is designed to allow the developer a designated place to perform side effects. ... The tap operator is designed solely for such...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Post

No results found

github_iconTop Related Hashnode Post

No results found