Created
February 16, 2019 15:53
-
-
Save Kornil/482d8e2d7db5de2ee48d50a10553ead6 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
const areEqual = (prevProps, nextProps) => ( | |
prevProps.myProp === nextProps.myProp | |
); | |
const Hello = ({ myProp }) => ( | |
<div>{myProp}</div> | |
); | |
export default React.memo(Hello, areEqual); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment