JSFiddle - React, Tailwind, and code Playground

by RoryMcCrossan

HTML

<input type="text" id="barcode" />

JavaScript

$('#barcode').keypress(function(e) {
    if (e.which == 13 && this.value) {
        alert("This works!")
    }
})