All Questions
7 questions
1
vote
3
answers
969
views
Toggling value of behavior subject without using getValue
I want to toggle the boolean value of my behavior subject. I'm currently achieving this by using the Behavior Subject's getValue() method. This isn't ideal as I'm effectively taking my reactive, ...
0
votes
1
answer
180
views
How to call a SERVICE inside a Merge Scan when using the Reactive Approach RXJS in Angular
I am trying to use the reactive approach in my angular app and I am having trouble calling a service inside a scan. How do I do this? It seems the service returns an observable - how do I deal with ...
0
votes
2
answers
1k
views
How to use filter with two Observables and return only one in rxjs
I have a part of code that checks if two observables are up to date and returns the second observable if they are:
combineLatest([$source1, $source2]).pipe(
filter(([source1, source2]) => source1....
2
votes
2
answers
143
views
RxJS. Combine observables that emit less then 1 second apart
There are two observables that may be emiting together or separately: stream1 and stream2.
I need my subscription to fire only if stream2 fires less then 1 second after stream1 does.
Any way to ...
6
votes
1
answer
415
views
Should I use the pipe operator if I only use one operator?
RxJs version 5.5 introduced the pipe operator to make it easier to combine RxJs operators and to make tree shaking more efficient for these situations. My question is, should you use the pipe operator ...
1
vote
0
answers
576
views
RxJs SwitchIfEmpty Custom pipable operator
I have created a new RxJs(6) operator switchIfEmpty(other), it switches to other when the source is empty.
i'am new in marble tests, i've created some tests for validating my operator, all tests pass ...
0
votes
1
answer
571
views
Side-effects only when using Pipeable Operators?
I'm rewriting some of my code to use Pipeable Operators in place of "patch" operators and I'm a little confused about when to use pipe() and how do I subscribe to a piped Observable to "activate" it ...