Created
May 4, 2017 17:47
-
-
Save mushfiqweb/62f44b583247ad08c70551e8553928d9 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
| class MyComponent extends React.Component { | |
| // only re-render if the ID has changed! | |
| shouldComponentUpdate(nextProps, nextState) { | |
| return nextProps.id === this.props.id; | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment