JSFiddle - React, Tailwind, and code Playground
HTML
<div class="div1">
<div class="div2"></div>
</div>
CSS
.div1{width:100px; height:100px;overflow: auto;}
.div2{width:200px; height:200px;}
JavaScript
var width = $('.div1')[0]['clientWidth'];
var height = $('.div1')[0]['clientHeight'];
alert(width+'+'+height);