JSFiddle - React, Tailwind, and code Playground

HTML

<input type="text" class="button"/>
<input type="text" class="button"/>

JavaScript

$(function(){
  $(".button").click(function(){
    this.value = "novo valor"
  });
});