Completely redefines the APIs used to build client-side routers / SPAs
🫤 History API: popState, link click.preventDefault() ...
✅ Navigation API: clean, centralized way to intercept navigation events 👌
Completely redefines the APIs used to build client-side routers / SPAs
🫤 History API: popState, link click.preventDefault() ...
✅ Navigation API: clean, centralized way to intercept navigation events 👌
githero.app was performing really badly when using the back button in the browser. The whole app was refreshing. Initially I thought I was doing something wrong but quickly saw that it could only be that the routing library was not listening to the popstate event.
githero.app was performing really badly when using the back button in the browser. The whole app was refreshing. Initially I thought I was doing something wrong but quickly saw that it could only be that the routing library was not listening to the popstate event.
jschof.dev/posts/2025/1...
jschof.dev/posts/2025/1...
anyway feel free to vacate my mentions
anyway feel free to vacate my mentions
window.addEventListener("popstate", () => {
window.event = null;
router.navigate(window.location.pathname, false);
})
window.addEventListener("popstate", () => {
window.event = null;
router.navigate(window.location.pathname, false);
})
My version has shallow routing to update the URL, listens to popstate to handle browser back, and also has a dedicated /p/slug page for direct linking or reloads.
github.com/leerob/nextzy
My version has shallow routing to update the URL, listens to popstate to handle browser back, and also has a dedicated /p/slug page for direct linking or reloads.
github.com/leerob/nextzy
```
addEventListener("popstate", (event) => {console.log(window.location.hash)})
```
and in handler you read hash value and render content you want.
```
addEventListener("popstate", (event) => {console.log(window.location.hash)})
```
and in handler you read hash value and render content you want.
🎧: melaniemartinez.lnk.to/HADES
🎧: melaniemartinez.lnk.to/HADES
The song also debuted at #91 on Spotify's US chart, with 442,000 streams.
The song also debuted at #91 on Spotify's US chart, with 442,000 streams.
🔗See Complete List Of Winners: shorturl.at/64nnE
🔗See Complete List Of Winners: shorturl.at/64nnE
Read more⬇️
mccallonline.com/2026/02/09/s...
Read more⬇️
mccallonline.com/2026/02/09/s...
Fix: hook history.pushState + popstate, or a MutationObserver on the app root, and re-run on route change.
Fix: hook history.pushState + popstate, or a MutationObserver on the app root, and re-run on route change.
Read more⬇️
shorturl.at/sQ2dS
Read more⬇️
shorturl.at/sQ2dS
All of my e2e tests around history entries work with both native Navigation or the polyfill so far.
All of my e2e tests around history entries work with both native Navigation or the polyfill so far.
Read more⬇️
mccallonline.com/2026/02/05/f...
Read more⬇️
mccallonline.com/2026/02/05/f...
somesite#/article-name
After this you lisen on "Window: popstate event" to handle path change developer.mozilla.org/en-US/docs/W...
To navigate use norlam anchors or pushState.
somesite#/article-name
After this you lisen on "Window: popstate event" to handle path change developer.mozilla.org/en-US/docs/W...
To navigate use norlam anchors or pushState.