Created
June 19, 2021 20:40
-
-
Save sabesansathananthan/b99936d854c0e3f3186202f3188ed53f 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
import hoistNonReactStatic from "hoist-non-react-statics"; | |
function enhance(WrappedComponent) { | |
class Enhance extends React.Component {/*...*/} | |
hoistNonReactStatic(Enhance, WrappedComponent); | |
return Enhance; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment