Created
April 29, 2016 09:59
-
-
Save urmastalimaa/c160c8afefb2aaf1de1dd25b94ed5416 to your computer and use it in GitHub Desktop.
Embrace Simplicity
This file contains hidden or 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
// What is the actual meaning of this function? | |
const mapStateToProps = (state) => { | |
return { | |
words: state.remoteGame.words, | |
currentInput: state.remoteGame.currentInput, | |
pastInput: state.remoteGame.pastInput | |
} | |
} | |
// Extract the `words`, `currentInput`, `pastInput` properties from `remoteGame` property of the parameter | |
const betterMapStateToProps = R.compose( | |
R.pick(['words', 'currentInput', 'pastInput']), | |
R.prop('remoteGame') | |
); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment