Skip to content

Instantly share code, notes, and snippets.

@andyfangdz
Created April 24, 2018 14:03
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save andyfangdz/f9b8c1af65dfa511164a898c577f33bd to your computer and use it in GitHub Desktop.
Save andyfangdz/f9b8c1af65dfa511164a898c577f33bd to your computer and use it in GitHub Desktop.
Debug shouldComponentUpdate
shouldComponentUpdate(nextProps, nextState) {
for (let key in this.props) {
if (this.props[key] !== nextProps[key]) {
console.log(key);
}
}
return true;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment