#POPstate
👀 Navigation API will be available in all browsers soon 🎉

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 👌
November 5, 2025 at 9:35 AM
This part in particular isn’t accurate. Popstate navigations are transition enabled, but they commit without yielding if possible. The bug is specially using useOptimistic inside popstate, which most users won’t do themselves and arguably the router shouldn’t either.
November 22, 2025 at 12:48 AM
😱 Not so short JS horror story:

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.
November 23, 2024 at 5:02 PM
Build your own SPA router with URLPattern. Jim Schofield uses the URLPattern and History APIs to match routes, intercept links, and respond to popstate with vanilla JS. #javascript #routing

jschof.dev/posts/2025/1...
November 28, 2025 at 11:00 AM
not that i have to explain myself to some bloke on the internet, but this was my initial prompt, after which it immediately fucked up

anyway feel free to vacate my mentions
August 28, 2025 at 10:56 PM
popstate roulette
November 16, 2024 at 9:16 PM
search for "history.pushState", the popstate event listener and also the bit at the end under "//load from hash". i used to use hash fragments for pages, now I use query params, but the hash fragments are still supported for loading pages.
June 24, 2025 at 12:27 PM
For changes that came from a pushState call, there's the popState event to listen for: developer.mozilla.org/en-US/docs/W... You might need something custom if you're updating URL params via something other than pushState though. (possible to do all changes through pushState if it's not already?)
Window: popstate event - Web APIs | MDN
The popstate event of the Window interface is fired when the active history entry changes while the user navigates the session history. It changes the current history entry to that of the last page th...
developer.mozilla.org
June 24, 2025 at 1:11 PM
we have async popstate transitions at home 😂

window.addEventListener("popstate", () => {
window.event = null;
router.navigate(window.location.pathname, false);
})
November 18, 2025 at 4:02 PM
This was fun to build. I loved the original design but was annoyed that the URLs didn't work.

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
GitHub - leerob/nextzy: Minimal ecommerce store built with Next.js, inspired by yeezy.com.
Minimal ecommerce store built with Next.js, inspired by yeezy.com. - leerob/nextzy
github.com
December 30, 2024 at 4:01 PM
Use popstate event no onhashchange. It is working on links, on pushHistory, on back/forward navigation.

```
addEventListener("popstate", (event) => {console.log(window.location.hash)})
```
and in handler you read hash value and render content you want.
June 24, 2025 at 1:09 PM
I have moved to a desktop computer so I can see the console and it is: React (who’d have guessed); a graphql endpoint not coping under load; the next.js hydration not coping and reshowing page 1 but saying it’s page 4; pushState storing bad data and popstate not coping, therefore breaking refresh.
July 29, 2025 at 8:48 PM
“There is a bug with optimistic states and popstate. If you need to read the current route during a back navigation, which cannot complete synchronously (e.g. Supspends on uncached data), you can set the optimistic state before navigating back or defer the optimistic update in a timer or microtask”
November 25, 2025 at 7:09 PM
#POPstate: Melanie Martinez achieved the second-largest album debut of her career with #HADES, which debuted with 11M+ [11,018,101] unfiltered streams.

🎧: melaniemartinez.lnk.to/HADES
March 28, 2026 at 6:54 PM
#POPstate: #MileyCyrus' “Younger You” debuts at #158 on Spotify's global chart with 1.37 million streams.

The song also debuted at #91 on Spotify's US chart, with 442,000 streams.
March 28, 2026 at 6:46 PM
#POPstate: #MOLIY Makes History as First Ghanaian to Win ‘World Artist of the Year’ at the #iHeartRadioMusicAwards 2026. 🏆🇬🇭

🔗See Complete List Of Winners: shorturl.at/64nnE
March 30, 2026 at 7:02 PM
It concurrently rises to #1 on the hot adult contemporary listing.

Read more⬇️
mccallonline.com/2026/02/09/s...
Sombr’s “Back To Friends” Remains #1 At Pop Radio - PopState
“back to friends” rules two formats this week. More
mccallonline.com
February 9, 2026 at 11:47 PM
MV3 content-script gotcha: SPAs (Gmail, Calendar, most React sites) swap "pages" without firing a load event — so your script runs once and goes silent on navigation.

Fix: hook history.pushState + popstate, or a MutationObserver on the app root, and re-run on route change.
July 1, 2026 at 1:35 AM
That the popstate event doesn't tell you if it's a forward or backward navigation event is a crime against humanity and browser engine vendors should feel very, very bad.
December 14, 2023 at 6:08 PM
#kyedae and #tenz Call It Quits: What We Know About the Streamers’ Breakup.

Read more⬇️
shorturl.at/sQ2dS
Kyedae and TenZ Call It Quits: What We Know About the Streamers’ Breakup - PopState
Kyedae and TenZ share why they are calling it quits. More
shorturl.at
February 9, 2026 at 11:46 PM
Yeah, hash changes were tricky to handle, but I think I got it down. I was surprised to learn they fire a popstate event!

All of my e2e tests around history entries work with both native Navigation or the polyfill so far.
February 9, 2026 at 4:21 PM
#POPstate: #MidnightSun by #ZaraLarsson climbs to a new peak of No. 49 on the #HOT100, rising 11 spots this week. It marks her fourth entry to hit the chart’s upper tier, following #stateside (No. 6), #neverforgetyou (No. 13), and #lushlife (No. 50).
March 19, 2026 at 10:09 PM
Discover how Ghanaian star #FellaMakafui landed her role as #Abena in #Netflix’s ‘Aníkúlápó: The Ghoul Awakens.’

Read more⬇️
mccallonline.com/2026/02/05/f...
Fella Makafui Reveals Massive Career Milestone: Mastering Yoruba for Netflix’s ‘Anikulapo’ - PopState
Fella Makafui goes from zero Yoruba to Netflix stardom! More
mccallonline.com
February 9, 2026 at 11:48 PM
It would be good to include the actual issue you're seeing in React Router code, the sandbox shows the popstate thing well but we understand that now and it's hard to see how you want actual users to use this in the real router.
November 18, 2025 at 5:26 PM