JSFiddle - React, Tailwind, and code Playground

HTML

<body>  
  <div class="test"></div>
  <header class="main-header"></header>
</body>

CSS

body {
    width: 100%;
}
.main-header {
    width: 100%;
    height: 1700px;
    box-shadow: 0 1px 4px #888;
    position: relative;
    overflow: hidden;
}

.test {
    position: fixed;
    top: 0;
    left: 0;
    width: 100px;
    float: left;
    height: 100px;
    background-color: #eee;
    color: #000;
    padding: 20px;
}

JavaScript

$(document).ready(function () {
  var  header = $('.main-header'),
      	windowH = $(window).height();
  $('.test').text(windowH);
});