JSFiddle - React, Tailwind, and code Playground
HTML
<input>
<input type='submit'>
JavaScript
$('body').keydown(function(event) {
if (event.which == 13) { // If the user pressed Enter...
// Do what you need to do with the form data, e.g. submit them via Ajax.
}
})