We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
selector
component-store
the View Model selectors, that are selecting from multiple Observables and grouping into an object can have a lot of repetitions, e.g.:
readonly vm$: Observable<SomeViewModel> = this.select( this.selectedTab$, this.routerStateService.baseListRoute$, this.secondaryNavigationItems$, this.isFlaggedPage$, this.pageTitle$, this.hasError$, this.errorMessage$, ( selectedTab, baseRoute, secondaryNavTabs, isFlaggedPage, pageTitle, hasError, errorMessage, ) => ({ selectedTab, baseRoute, secondaryNavTabs, isFlaggedPage, pageTitle, hasError, errorMessage, }), { debounce: true }, );
Let's add an easier way, e.g.:
readonly vm$: Observable<SomeViewModel> = this.select({ selectedTab: this.selectedTab$, baseRoute: this.routerStateService.baseListRoute$, secondaryNavTabs: this.secondaryNavigationItems$, isFlaggedPge: this.isFlaggedPage$, pageTitle: this.pageTitle$, hasError: this.hasError$, errorMessage: this.errorMessage$, }, { debounce: true }, );
RxJS' combineLatest already allows to do just that https://rxjs.dev/api/index/function/combineLatest
combineLatest
combineLatest(sourcesObject: T): Observable<{ [K in keyof T]: ObservedValueOf<T[K]>; }>
No response
The text was updated successfully, but these errors were encountered:
select
createSelector
ComponentStore.select
alex-okrushko
Successfully merging a pull request may close this issue.
Which @ngrx/* package(s) are relevant/related to the feature request?
component-store
Information
the View Model selectors, that are selecting from multiple Observables and grouping into an object can have a lot of repetitions, e.g.:
Let's add an easier way, e.g.:
RxJS'
combineLatest
already allows to do just that https://rxjs.dev/api/index/function/combineLatestDescribe any alternatives/workarounds you're currently using
No response
I would be willing to submit a PR to fix this issue
The text was updated successfully, but these errors were encountered: