Created
June 21, 2016 19:55
-
-
Save osmelmora/8b3268da24a42b0a202b962f1e3c5a01 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
var TextComponent = React.createClass({ | |
shouldComponentUpdate: function(nextProps, nextState) { | |
if (this.props.text === nextProps.text) return false; | |
return true; | |
}, | |
render: function() { | |
return <textarea value={this.props.text} />; | |
} | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment