JSFiddle - React, Tailwind, and code Playground

JavaScript

function stayOnExpress() {
	if(!this.check){
  	console.log('checking');
  	this.check = $('html').hasClass('stay-on-express');
  }
  return this.check;
}

console.log(stayOnExpress());
$('html').addClass('stay-on-express');
console.log(stayOnExpress());
console.log(stayOnExpress());