JSFiddle - React, Tailwind, and code Playground

JavaScript

window.onpopstate = function(event) { alert(event.state.a) }
history.pushState({a: 1})
history.back()