JSFiddle - React, Tailwind, and code Playground
HTML
<input type="text" />
JavaScript
$(function(){
$("input").keyup(function(){
var $this = $(this);
if ($this.val().indexOf("=")>=0){
$this.val(eval($this.val().replace("=", "").replace("x","*")));
}
});
});