JSFiddle - React, Tailwind, and code Playground
by Marcel
HTML
<div id="target" style="display:none;">
<div style="height:123px; background:#000;"></div>
</div>
JavaScript
$("#target").show(0, function(){
the_height = $(this).find("div").height();
}).hide().after(the_height);