Skip to content

NextJS 14.1 now supports window.history.replaceState #466

Answered by franky47
shawngustaw asked this question in Ideas
Discussion options

You must be logged in to vote

Ah, nuqs has been using the Window History API since v1.8.0, much before Next.js did actually support it. That was the only way to do shallow updates (and it still is), which is the default.

The only difference now is that the app router is aware of shallow URL changes, and won't reset them accidentally (as it was the case in [email protected] with the prefetch bug, see #388).

It's been a wild ride, and a couple of Next.js versions had issues while they were implementing proper support for the History API, but I'm glad it's all converged now. I wrote about all of this on my blog.

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by franky47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Ideas
Labels
None yet
2 participants