JSFiddle - React, Tailwind, and code Playground
HTML
<button type="button" data-ajax="true" data-accion="hola">
Actualizar
</button>
JavaScript
$( document ).ready(function(){
$("[data-ajax=true]").on('click',function(){
if($(this).data('accion'))
eval($(this).data('accion') + "()");
});
});
function hola(){
alert('llegue al hola');
}