JSFiddle - React, Tailwind, and code Playground

HTML

<div id="test">
Some Text
</div>
<button id="change">
change
</button>

JavaScript

$('#change').click(function(){
	$('#test').text('new content');
  alert('how to make this alert shows after the div changes its content?')
})