JSFiddle - React, Tailwind, and code Playground

HTML

<script src="http://meetselva.github.io/attrchange/javascripts/attrchange.js"></script>
<div id="test"></div>
<div id="logger"></div>

CSS

#test {
    border: 1px solid red;
    width: 100px;
    height: 100px;
}

JavaScript

$(function () {
    var prevHeight = $('#test').height();
    $('#test').attrchange({
        callback: function (e) {
            var curHeight = $(this).height();            
            if (prevHeight !== curHeight) {
               $('#logger').text('height changed from ' + prevHeight + ' to ' + curHeight);
                
                prevHeight = curHeight;
            }            
        }
    }).resizable();
});