Native JavaScript Routing?
We can update the URL in JavaScript. We’ve got the APIs pushState
and replaceState
:
// Adds to browser history
history.pushState({}, "About Page", "/about");
// Doesn't
history.replaceState({}, "About Page", "/about");
JavaScript is also capable of replacing any content in the …