Created
October 22, 2016 13:09
-
-
Save jaxxreal/84445d7553db19aed8d58eb3674c696e to your computer and use it in GitHub Desktop.
PureCheckbox example
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 PureCheckbox extends Component { | |
shouldComponentUpdate(nextProps) { | |
return nextProps.label !== this.props.label || nextProps.checked !== this.props.checked; | |
} | |
render() { | |
return <Checkbox {...this.props}/>; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment