shouldComponentUpdate (nextProps) {
for (let key in nextProps) {
if (nextProps[key] !== this.props[key] && typeof nextProps[key] !== 'function') {
return true
}
}
return false
}
Created
October 10, 2018 03:31
-
-
Save wulucxy/b12f394a6eeb17908bb08bbdc749166e to your computer and use it in GitHub Desktop.
shouldComponentUpdate #React
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment