michaelkrone / ngrx-normalizr

Managing normalized state in ngrx applications - transparently
https://michaelkrone.github.io/ngrx-normalizr/
MIT License
50 stars 17 forks source link

Use entitiesProjector to select objects by a list of ids #19

Closed juanpmarin closed 6 years ago

juanpmarin commented 6 years ago

Hi, this PR is related to #18 This is a proposal implementation, To use it create a selector and pass a selected array of ids, like this: export const getPostComments = createSelector( selectComments.getNormalizedEntities, getSelectedPostCommentsIds, selectComments.entitiesProjector );

Thanks !

michaelkrone commented 6 years ago

Awesome @juanpmarin I'll take a look at this.