Skip to content

Instantly share code, notes, and snippets.

@osmelmora
Created June 21, 2016 19:55
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save osmelmora/8b3268da24a42b0a202b962f1e3c5a01 to your computer and use it in GitHub Desktop.
Save osmelmora/8b3268da24a42b0a202b962f1e3c5a01 to your computer and use it in GitHub Desktop.
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