JSFiddle - React, Tailwind, and code Playground
HTML
<div>
<button id="test">Test the click</button>
</div>
<button id="button">Supposed to be clicked</button>
JavaScript
$('#test').on('click', function() {
$( "#button" ).trigger( "click" );
});