Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cover multiple sync emissions #33

Open
kosich opened this issue Oct 24, 2020 · 0 comments
Open

Cover multiple sync emissions #33

kosich opened this issue Oct 24, 2020 · 0 comments
Labels
bug Something isn't working discuss

Comments

@kosich
Copy link
Owner

kosich commented Oct 24, 2020

Currently, we are skipping multiple sync emissions. This will wait for all 3 values from a and only then would produce a result:

const a = of(1, 2, 3);
const b = of('🐁');
computed(() => $(a) + $(b)).subscribe(…); // > 3🐁

I think its fine for computed, but it seems to be an issue for our shiny new combined (or whatever name we end up with in #32):

combined(() => $(a) + $(b)).subscribe(…); // > 1🐁 > 2🐁 > 3🐁

Though it's not very clear how to handle this with multiple streams emitting synchronously.

combineLatest ignores sync values from the first stream:

const a$ = of(1,2,3);
const b$ = of('a', 'b', 'c');
const result$ = combineLatest(a$, b$);

combinelatest---rxjs-operator-example---marble-diagram


So, I'm not sure if, what, and how it should be done.
Please, share your thoughts!

@kosich kosich added bug Something isn't working discuss labels Oct 24, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working discuss
Projects
None yet
Development

No branches or pull requests

1 participant