Skip to content

Instantly share code, notes, and snippets.

@aaronshaf
Created May 6, 2017 02:04
Show Gist options
  • Save aaronshaf/1bb156de60196dfbf163b797c8821acc to your computer and use it in GitHub Desktop.
Save aaronshaf/1bb156de60196dfbf163b797c8821acc to your computer and use it in GitHub Desktop.
shouldComponentUpdate (nextProps, nextState) {
const changedProps = {}
for (const prop in this.props) {
if (this.props[prop] !== nextProps[prop]) {
changedProps[prop] = true
}
}
if (Object.keys(changedProps).length) {
console.debug(changedProps)
}
return true
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment