JSFiddle - React, Tailwind, and code Playground

HTML

<input type="submit" name="next" value="Next">
<input type="button" id="valid" name="next" value="Valid">

JavaScript

$("input[type='submit']").prop('disabled', true);
$("#valid").click(function() {

    $("input[type='submit']").prop('disabled', false);
})