JSFiddle - React, Tailwind, and code Playground
by Addy Osmani
HTML
<input id="messageBox" type="text"/>
JavaScript
$("#messageBox").keypress(function(e) {
alert(e.keyCode);
if(e.keyCode == 13) {
chatApp.sendMessage();
}
});