Created
November 6, 2017 18:34
-
-
Save tristanpendergrass/f3a0075c0f86b7128dcdfb056723b957 to your computer and use it in GitHub Desktop.
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
const processData = someExpensiveFunction; | |
const mapStateToProps = state => ({ | |
foos: processData(getFoos(state)), | |
}); | |
const MyComponent = props => ( | |
<div>baz: {props.baz}</div> | |
<SubComponent data={props.foos} /> | |
); | |
export default connect(mapStateToProps)(MyComponent); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment