Last active
November 23, 2018 09:44
-
-
Save VivienAdnot/f5ac2055ff3223b02a3b226809f0b8be to your computer and use it in GitHub Desktop.
redux: createSelector signature
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 createSelector = (state, props) => { | |
return (inputSelectors, transformFn) => { | |
const applySelectors = inputSelectors.map(selector => selector(state, props); | |
return transformFn(...applySelectors); | |
}; | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment