JSFiddle - React, Tailwind, and code Playground

by David Thomas

HTML

<input value="something" /><button class="reset">Reset the input</button>

JavaScript

$('button.reset').click(
    function(){
        var input = $(this).prev('input:first');
        input.val(''); // assuming you want it reset to an empty state;
    });

$('form').submit(
    function() {
        return false;
    });