Created
September 13, 2017 04:04
-
-
Save vcarl/76ca26f5c40b3ecfc5e4e22aec81bbd4 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 ToHoc = (Component) => { | |
return (Wrapped) => { | |
class GeneratedHOC extends React.Component { | |
render() { | |
return ( | |
<Component render={args => <Wrapped {...this.props} {...args} /> } /> | |
); | |
} | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment