Created
May 6, 2016 10:15
-
-
Save bySabi/a4f5999693d5e1ebfa86a7a7987afc05 to your computer and use it in GitHub Desktop.
Minimal higher order React Component
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
``` | |
const hoc = C => class _hoc extends React.Component { | |
render() { | |
return <C { ...this.props }/>; | |
} | |
} | |
const hoc = C => function _hoc(props) { | |
return <C { ...props }/>; | |
``` |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment