Last active
June 19, 2021 20:25
-
-
Save sabesansathananthan/97a7cea7df6945b8e41583e6cb829a14 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
render() { | |
// Each call to the render function creates a new EnhancedComponent | |
// EnhancedComponent1 !== EnhancedComponent2 | |
const EnhancedComponent = enhance(MyComponent); | |
// This will cause the subtree to be unloaded and remounted every time it is rendered! | |
return <EnhancedComponent />; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment