-
-
Notifications
You must be signed in to change notification settings - Fork 2k
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
NgRx Store: Add createChildSelectors
function
#2974
Comments
I think we should look at unifying this into something similar to |
Hey @brandonroberts, Did you mean something like this? const {
selectMusiciansState // 👈 feature selector
selectMusicians,
selectLoading,
selectPagination
} = createSliceSelectors('musicians', initialState); |
Something more like export const {
reducer(maybe),
featureKey,<- musicians
featureSelector, <- createFeatureSelector('musicians') or selectMusiciansState
selectLoading,
selectCurrentMusicianId,
...
} = createFeature<State>({
name: 'musicians',
reducer
}) |
Looks good 👍 I will be happy to create a PR if you and the other team members agree :) Btw, I would also add |
Description
createChildSelectors
function creates memoized and strongly typed child selectors based on the parent selector. There are two signatures:First:
Second:
Full description is available here: https://github.com/markostanimirovic/ngrx-child-selectors
Other information:
This feature can be implemented when we upgrade TypeScript version to 4.1 or higher.
If accepted, I would be willing to submit a PR for this feature
[x] Yes ❤️
[ ] No
The text was updated successfully, but these errors were encountered: