Skip to content

Instantly share code, notes, and snippets.

@codeocelot
Last active November 9, 2017 12:09
Show Gist options
  • Save codeocelot/05b9ccd50346ab3db39df3903e339315 to your computer and use it in GitHub Desktop.
Save codeocelot/05b9ccd50346ab3db39df3903e339315 to your computer and use it in GitHub Desktop.
HoC example using vanilla React component notation
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