JSFiddle - React, Tailwind, and code Playground

HTML

After a window resize an alert will be visible.<br>
<br>
<button type="button" id="manually-resize">call resize handlers manually</button>

JavaScript

$(window).resize(function() {
    alert('resize handler called');
});

$('#manually-resize').click(function() {
    $(window).resize();
});