JSFiddle - React, Tailwind, and code Playground
HTML
<div id='div' style='width:300px; height:300px; border: solid'></div>
JavaScript
$(document).ready(function() {
setInterval(function() {
$('#div').text($('#div').width());
}, 30);
});