Closed david-hindman closed 2 years ago
Based on the marble diagram it looks like this is how WithLatestFrom
is supposed to work:
https://rxjs-dev.firebaseapp.com/api/operators/withLatestFrom
You don't get a value on subscription, you get it after you have subscribed and the left value (A
) emits. The reason your second example works is because the left value is emitting 1 frame after the subscription.
Example:
Expected output: 1 2 3
Actual output: 1 2
Strangely, if I add a DelayFrame operator on A as seen below, the expected output is produced:
I'm sure this can be explained but I don't understand it and it's certainly not intuitive. Is this an issue or am I misunderstanding something about how WithLatestFrom works?