JSFiddle - React, Tailwind, and code Playground

by cferdinandi

JavaScript

var viewportWidth = window.innerWidth || document.documentElement.clientWidth;
if (viewportWidth > 640) {
	console.log('Wide viewport');
} else {
	console.log('Small viewport');
}