JSFiddle - React, Tailwind, and code Playground

JavaScript

function width(){
  return(window.innerWidth)?
  window.innerWidth:
  document.documentElement.clientWidth||document.body.clientWidth||0;
}
function height(){
  return(window.innerHeight)?
  window.innerHeight:
  document.documentElement.clientHeight||document.body.clientHeight||0;
}
$(document).ready(function(){
    alert( window.innerHeight ); 
});