JSFiddle - React, Tailwind, and code Playground

by ExplosionPIlls

HTML

<a href="?tx">click</a>

JavaScript

document.querySelector('a').addEventListener('click', function (e) {
    e.preventDefault();

    history.pushState(null, null, '?tx');
});

window.addEventListener('popstate', function () {
    console.log('hey');
});