JSFiddle - React, Tailwind, and code Playground
JavaScript
var js = document.createElement("script");
var head = document.getElementsByTagName('head')[0];
js.type = "text/javascript";
if (window.innerWidth > 500)
{
js.src = "js/jquery_computer.js";
console.log('wide');
}
else
{
js.src = "js/mobile_version.js";
console.log('narrow');
}
head.appendChild(js);