JSFiddle - React, Tailwind, and code Playground
JavaScript
// js start
console.log('js start');
var hash = {
'set' : function(val){ window.location.hash = val },
'log' : function(){ console.log('Hash log: '+ window.location.hash) },
'bind': function(){ $(window).bind('hashchange', this.log) }
};
// set
hash.set('hash0');
hash.set('hash1');
hash.set('hash2');
hash.set('hash3');
// bind
hash.bind();
// js end
console.log('js end');