Skip to content

Instantly share code, notes, and snippets.

@tylermcginnis
Created December 17, 2015 05:24
Show Gist options
  • Save tylermcginnis/3804a4002e45cd6f0ddd to your computer and use it in GitHub Desktop.
Save tylermcginnis/3804a4002e45cd6f0ddd to your computer and use it in GitHub Desktop.
var Test = React.createClass({
add: function(event){
if(event.keyCode == 13){
alert('Adding....');
}
},
render: function(){
return(
<div>
<input type="text" id="one" onKeyDown={this.add} />
</div>
);
}
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment