Last active
October 2, 2018 04:12
-
-
Save StevenJL/9de9ca76974fb878ce6955de54b58fcc to your computer and use it in GitHub Desktop.
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
import shallowEqual from 'shared/shallowEqual'; | |
/* | |
shallowEqual is a helper function from the React source code: | |
https://github.com/facebook/react/blob/72434a7686035b4af766ee7d06c070d7f5d6a5f2/packages/shared/shallowEqual.js | |
*/ | |
shouldComponentUpdate(nextProps, nextState) { | |
return !shallowEqual(this.props, nextProps) || !shallowEqual(this.State, nextState); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment