Last active
November 9, 2017 12:09
-
-
Save codeocelot/05b9ccd50346ab3db39df3903e339315 to your computer and use it in GitHub Desktop.
HoC example using vanilla React component notation
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 UppercaseHoC = (WrappedComponent) => class extends React.Component{ | |
render(){ | |
return( | |
<div style="text-transform: uppercase;"> | |
<WrappedComponent {...this.props} /> | |
</div> | |
) | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment