how to get the browser viewport dimensions react code example Example: react js get screen size console.log(window.innerHeight);