JSFiddle - React, Tailwind, and code Playground
HTML
<a href="#" onclick="window.onpopstate = function() { alert('pop'); }; return false; ">set up window.onpopstate</a><br>
<a href="#somehash2">change hash</a>
<div onclick="alert(location.href);">show location.href</div>