JSFiddle - React, Tailwind, and code Playground

HTML

<button onclick='fn.one()'>1</button>
<button onclick='fn.two()'>2</button>
<button onclick='fn.three()'>3</button>

JavaScript

window.fn = {
    one: function(){alert('1')},
    two: function(){alert('2')},
    three: function(){alert('3')}
};