JSFiddle - React, Tailwind, and code Playground

HTML

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

JavaScript

test = function(){
 console.log('test');
}