Created
October 24, 2018 15:10
-
-
Save pomber/304f510a86bc185be9176f62aeaedae5 to your computer and use it in GitHub Desktop.
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
function MyComponent(props) { | |
/* render using props */ | |
} | |
function areEqual(prevProps, nextProps) { | |
/* | |
return true if passing nextProps to render would return | |
the same result as passing prevProps to render, | |
otherwise return false | |
*/ | |
} | |
export default React.memo(MyComponent, areEqual); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment