Skip to content

Instantly share code, notes, and snippets.

@teimurjan
Created May 21, 2018 06:37
Show Gist options
  • Save teimurjan/49d567acf4108e3b305d654f2d123163 to your computer and use it in GitHub Desktop.
Save teimurjan/49d567acf4108e3b305d654f2d123163 to your computer and use it in GitHub Desktop.
blog-react-applications-optimization
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