Skip to content

Instantly share code, notes, and snippets.

@vcarl
Created September 13, 2017 04:04
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save vcarl/76ca26f5c40b3ecfc5e4e22aec81bbd4 to your computer and use it in GitHub Desktop.
Save vcarl/76ca26f5c40b3ecfc5e4e22aec81bbd4 to your computer and use it in GitHub Desktop.
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