Created
January 22, 2017 16:58
-
-
Save marg51/c9a50e63f531476103c48740bd3443d4 to your computer and use it in GitHub Desktop.
medium — connect
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
function connect(mapStateToProps, mapDispatchToProps) { | |
return (Target) => { | |
// we need to return a class | |
class Connected extends Component { | |
render() { | |
return <Target /> | |
} | |
} | |
return Connected | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment