JSFiddle - React, Tailwind, and code Playground

HTML

<script>
var testFunc = function() {
	alert('works!');
}

var funcs = {
	func: testFunc
};
</script>

<button onclick=funcs.func()>Press me!</button>