JSFiddle - React, Tailwind, and code Playground

JavaScript

var o = {
    event: function () {
        console.log('method called');
    }
};
        
$(o).trigger('event');