Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Composing redux selectors
export const getFullName = createSelector(
(state) => state.firstName,
(state) => action.lastName,
(firstName, lastName) => [firstName,lastName].join(' ')
);
export const getNameWithBirthdate = createSelector(
getFullName,
state => state.birthday,
(fullName, birthday) => `${fullname} born on ${birthday}`
);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.