JSFiddle - React, Tailwind, and code Playground

HTML

<div class="container">
    <div class="block"></div>
    <div class="container-hf">
        <div class="block"></div>
    </div>
</div>

CSS

.container {
    width:150px;
}
.container-hf {
    width: 100px;
}
.block {
    background: red;
    margin-bottom: 10px;
}

JavaScript

$('.block').height($(this).width());