Created
May 21, 2018 06:37
-
-
Save teimurjan/49d567acf4108e3b305d654f2d123163 to your computer and use it in GitHub Desktop.
blog-react-applications-optimization
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
export default class extends React.PureComponent { | |
shouldComponentUpdate(nextProps, nextState) { | |
return !( | |
shallowEqual(nextProps, this.props) && shallowEqual(nextState, this.state) | |
); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment