Created
April 29, 2016 11:06
-
-
Save mmollaverdi/2c5e4c0a86431ecb9062f2ccc0a7d64c to your computer and use it in GitHub Desktop.
Logged HOC
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 logged = ComposedComponent => React.createClass({ | |
render() { | |
console.log(`Rendering ${ComposedComponent.displayName}`); | |
return <ComposedComponent ...{this.props} /> | |
} | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment