JSFiddle - React, Tailwind, and code Playground

HTML

<button type="button">Test</button>

JavaScript

var submit_button = $('button')

submit_button.click(function () {
  submit_button.text('Send')
  setTimeout(function () { alert('test') }, 1)
})