JSFiddle - React, Tailwind, and code Playground
JavaScript
var model = {};
$(model).on('customEvent', function () { console.log('hehe'); });
$(model).trigger('customEvent');
var model = {};
$(model).on('customEvent', function () { console.log('hehe'); });
$(model).trigger('customEvent');