I\'ve two react events:
Form submit event
sendMessage: function(event){
console.log(event);
event.preventDefault();
},
It's your component, so you don't need to worry about passing actual events around. You have some event handlers, and then you have the actual action.
sendMessage: function(){
console.log('message:', this.state.message);
},
handleFormSubmit: function(event){
event.preventDefault();
this.sendMessage();
},
handleTextareaKeypress: function(event){
if (event.which == 13 && !event.shiftKey){
this.sendMessage();
}
}