Last active
July 20, 2017 20:47
-
-
Save baptistemanson/6fb75e345855ac7268e78ca4b4d97a87 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const getGroupsById = (state, ids) => ids.map(id => state.groups[id]) | |
const getUsersWithGroupsById = (state, ids) => ids.map(id => ({...state.users[id], groups: getGroupsById(state.users[id].groups)})) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment