Created
April 8, 2016 10:18
-
-
Save wuct/882122a900e2a96d2c7eb4fd3d12f004 to your computer and use it in GitHub Desktop.
Three types of HoCs
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 = BaseComponent => | |
BaseComponent | |
const hoc = BaseComponent => | |
() => <BaseComponent /> | |
const hoc = BaseComponent => | |
class extend React.Component { | |
render = () => <BaseComponent /> | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment