Created
April 24, 2021 22:14
-
-
Save sabesansathananthan/a9a9a6bd63b429e5a6787893262c5b40 to your computer and use it in GitHub Desktop.
How React Components Are Reused
This file contains hidden or 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 = (WrappedComponent) => { | |
return class EnhancedComponent extends WrappedComponent { | |
render() { | |
return this.props.isRender && super.render(); | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment