JSFiddle - React, Tailwind, and code Playground
by darcyclarke
HTML
<a href="#">Some link</a>
JavaScript
var el = document.querySelector('a');
el.addEventListener('click', function(e) {
e.preventDefault();
console.log('clicked');
history.pushState({}, '', 'something');
});
window.addEventListener('popstate', function(e) {
console.log('popstat');
console.dir(e);
});