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

RxState: additional connect-overload #1632

Open
mikelgo opened this issue Oct 29, 2023 · 4 comments
Open

RxState: additional connect-overload #1632

mikelgo opened this issue Oct 29, 2023 · 4 comments
Labels
✍️ Enhancement New feature or request { } State @rx-angular/state related

Comments

@mikelgo
Copy link
Contributor

mikelgo commented Oct 29, 2023

Problem Solved By The Feature

Less Code needed to connect partial state observables. The current way is to call multiple times connect:

connect('a', a$)
connect('b', b$)

Solution

I would like to add this overload to connect:
connect(object: Partial<{ [P in keyof T]: Observable<T[P]> }>): void;

With this overload one could just do connect({a: a$, b: b$})

Wdyt? If you like this feature request I would be happy to contribute the implementation

@hoebbelsB hoebbelsB added { } State @rx-angular/state related ✍️ Enhancement New feature or request labels Oct 29, 2023
@hoebbelsB
Copy link
Member

i really like the idea, we also need this overload for rxLet ^^

@hoebbelsB
Copy link
Member

I think @BioPhoton worked on something that goes in this direction: #1192

@mikelgo
Copy link
Contributor Author

mikelgo commented Oct 29, 2023

#1192

Oh yes. smosh seems like exactly doing this. but it seems like there's no progress?
Also if I see it correctly there it is not considered that the combineLatest will not emit if there's by accident a source connected which will not emit a value. This should be handled.

Just let me know how to proceed =) Shall we consider a similar implementation like smosh for this feature? I would then try to open a PR soon :)

@mikelgo
Copy link
Contributor Author

mikelgo commented Nov 8, 2023

just want to mention that i started to work on this. I do have an initial implementation i just now need to write some tests

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
✍️ Enhancement New feature or request { } State @rx-angular/state related
Projects
None yet
Development

No branches or pull requests

2 participants