JSFiddle - React, Tailwind, and code Playground

HTML

<input type="button" value="test" onclick="test()">

JavaScript

function test(){
 alert("test");   
}